Sign inSign up

hyrsh/l7-snake

By hyrsh

•Updated over 3 years ago

L7 tracer with chaining options

Image
0

123

hyrsh/l7-snake repository overview

⁠l7-snake

Simple gRPC L7 tracer for network troubleshooting.


⁠Usage

There is a default config file at /config.yml that looks as follows:

data:
        communication:
            id: snake-endpoint
            listenport: "9001"
            targets:
              - 127.0.0.1:9001
        routing:
            routes:
              - default
            terminator: yes
        settings:
            interval: 1s

You can overwrite the file with your settings by mounting your own config.yml to /config.yml.

e.g. you can write your own myconfig.yml and run a command from the respective directory:

docker run --rm -it --mount type=bind,source="$(realpath myconfig.yml)",target="/config.yml" hyrsh/l7-snake:1.0

The "terminator" property dictates how the image behaves:

  • "false"
    • the binary sends requests to "targets" with "interval" delays
  • "true"
    • the binary listens on port "listenport" for incoming requests

The "interval" is a parsed GoLang duration string (time.ParseDuration) in a form like "1s", "150ms", "25m", "1d".


⁠Kubernetes

Deploy a chain element with:

kubectl apply -f https://raw.githubusercontent.com/hyrsh/l7-snake/main/kubernetes/snake-chain-dpl.yml

Deploy a server with:

kubectl apply -f https://raw.githubusercontent.com/hyrsh/l7-snake/main/kubernetes/snake-endpoint-dpl.yml
⁠Intention

Distributed networks often get confusing, so I decided to code a little helper. Since I am not a programmer, I never used gRPC and wanted to give it a try.

I like it and the helper tool "L7-Snake" is sufficient for a low-level network overview when tools like SDNs (NSX, Nuage, Midonet), Meshes (Istio, LinkerD, etc.), Monitoring (Icinga, Nagios, Datadog, etc.) or other analysis is limited.

Especially for gated networks (subnet locks) it does serve me well.

Enjoy :)


⁠Source code

All code is here: https://github.com/hyrsh/l7-snake⁠


Tag summary

Content type

Image

Digest

sha256:978810c5d…

Size

3.2 MB

Last updated

over 3 years ago

docker pull hyrsh/l7-snake:1.0