GithubHelp home page GithubHelp logo

Port Info on node graph about k8spacket HOT 9 CLOSED

bigfoot6uk avatar bigfoot6uk commented on May 29, 2024
Port Info on node graph

from k8spacket.

Comments (9)

k8spacket avatar k8spacket commented on May 29, 2024

Hi @bigfoot6uk

As far as I understand you would like to have information about the destination port (the source port is often random) directly on node graph visualization. Am I right?

There are two options for it:

  1. add dest port information to the pod name field
  2. add dest port information to the IP field

Both have some disadvantages:

  1. When you add this information to the pod name, you will have only information about one exposed port by the container (the pod name is not the unique identifier for creating a node on visualization), which could not be the truth about the established connection.

image

To check this solution you can try the plugin from the URL: https://k8spacket.s3.eu-central-1.amazonaws.com/issue-26/nodegraph-name-x86_64.so

  1. When you add a port to the destination IP, which is a unique identifier for nodes, then you will lose the possibility to create a node graph because every connection on visualization will be one to one

image

To check this solution you can try the plugin from the URL: https://k8spacket.s3.eu-central-1.amazonaws.com/issue-26/nodegraph-ip-x86_64.so

To use provided plugins, change your local helm values file (https://github.com/k8spacket/k8spacket-helm-chart/blob/master/charts/k8spacket/values.yaml#L55) to chosen plugin, f.e. to use the plugin with destination port added to pod name:

...

k8sPacket:
  ## Available plugin releases. Custom plugins can be provided
  plugins:
    - https://k8spacket.s3.eu-central-1.amazonaws.com/issue-26/nodegraph-name-$(arch).so
    - https://github.com/k8spacket/plugins/releases/download/v1.1.0/tls-parser-$(arch).so

...

For the plugin with destination port added to IP:

...

k8sPacket:
  ## Available plugin releases. Custom plugins can be provided
  plugins:
    - https://k8spacket.s3.eu-central-1.amazonaws.com/issue-26/nodegraph-ip-$(arch).so
    - https://github.com/k8spacket/plugins/releases/download/v1.1.0/tls-parser-$(arch).so

...

then run:

helm upgrade --install k8spacket --namespace k8spacket k8spacket/k8spacket -f custom-values.yaml

from k8spacket.

k8spacket avatar k8spacket commented on May 29, 2024

@bigfoot6uk
This thread is inactive for 10 days.

I'm going to close this issue, but plugins will be still available on S3 AWS.

from k8spacket.

perithompson avatar perithompson commented on May 29, 2024

im just trying to use that custom plugin but i am getting the error

plugins/nodegraph-name-x86_64.so
fatal error: runtime: no plugin module data

goroutine 1 [running]:
runtime.throw({0x22c968e?, 0xca213b?})
        /usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0xc0001e5b10 sp=0xc0001e5ae0 pc=0xc71c9d
plugin.lastmoduleinit()

any chance you can take a look?

from k8spacket.

k8spacket avatar k8spacket commented on May 29, 2024

Hi @perithompson

Let's notice, that custom plugins were built with k8spacket version 1.1.0 and the newest available version is 1.1.1

You got this error because you are trying to use the 1.1.0 plugin version with the 1.1.1 k8spacket version.
You need to downgrade k8spacket to version 1.1.0 to make this custom plugin works.
Use command:

helm upgrade --install k8spacket --namespace k8spacket --version 1.1.0 k8spacket/k8spacket -f custom-values.yaml

from k8spacket.

perithompson avatar perithompson commented on May 29, 2024

that worked thank you! I wonder if it makes sense to have a separate plugin for just having a complete trace of connections in one api, that isn't meant to provide the grafana data, that way if someone wanted to just list all the packet traces with all the data that could and that way you wouldnt need to worry about breaking the nodegraph dashboard?

from k8spacket.

k8spacket avatar k8spacket commented on May 29, 2024

Hi @perithompson

Everything makes sense if it will be a helpful tool for monitoring your system 👍
As far as I understand, you want an endpoint that gets the result directly about connections stored here: https://github.com/k8spacket/plugins/blob/master/nodegraph/metrics/nodegraph/updater.go#L9 ?

I see your fork: k8spacket/plugins@master...perithompson:k8spacket-plugins:master

Two things:

from k8spacket.

k8spacket avatar k8spacket commented on May 29, 2024

Hi @perithompson
This thread has been inactive for more than 10 days.

I will close this issue, looking forward to seeing your version of the new plugin.

from k8spacket.

Tim-herbie avatar Tim-herbie commented on May 29, 2024

Hi,
I installed the helm chart on minikube (Mac with M1) and I would like to use the plugin to see the ports as well, but it´s not working for me.

Here is my values file:

k8sPacket:
  tcp:
    listener:
      interfaces:
        command: "ip address | grep @ | grep -E 'cali|tunl' | sed -E 's/.* (\\w+)@.*/\\1/' | tr '\\n' ',' | sed 's/.$//'"
  plugins:
    - https://k8spacket.s3.eu-central-1.amazonaws.com/issue-26/nodegraph-ip-$(arch).so

Any my command:

helm upgrade --install k8spacket --namespace k8spacket --version 1.1.0 k8spacket/k8spacket -f values.yaml

The pods are running, but it seems that the plugin can´t be downloaded.

Here are some Logs from the Pods:

kubectl logs k8spacket-gll8f -f                                                                                                                                                        ─╯
Defaulted container "k8spacket" out of: k8spacket, init-k8spacket (init)
2023/11/27 09:26:20 Serving requests on port 6676
2023/11/27 09:26:20 Refreshing interfaces for capturing...
Getting k8s resources
2023/11/27 09:26:20 Starting capture on interface "cali65dd643ad8e"
2023/11/27 09:26:20 Starting capture on interface "tunl0"
2023/11/27 09:26:20 Starting capture on interface "cali71fc5d89cf3"
2023/11/27 09:26:20 Starting capture on interface "cali9b4b22ac4a9"
2023/11/27 09:26:20 Starting capture on interface "calidda222b5124"
2023/11/27 09:26:20 Starting capture on interface "cali267539ab216"
2023/11/27 09:26:20 reading in packets
2023/11/27 09:26:20 reading in packets
2023/11/27 09:26:20 reading in packets
2023/11/27 09:26:20 reading in packets
2023/11/27 09:26:20 reading in packets
Found 33 pods
2023/11/27 09:26:20 reading in packets
Found 23 services
2023/11/27 09:26:30 Refreshing interfaces for capturing...
2023/11/27 09:26:40 Refreshing interfaces for capturing...
2023/11/27 09:26:50 Refreshing interfaces for capturing...
2023/11/27 09:27:00 Refreshing interfaces for capturing...
2023/11/27 09:27:10 Refreshing interfaces for capturing...
2023/11/27 09:27:20 Refreshing interfaces for capturing...
2023/11/27 09:27:30 Refreshing interfaces for capturing...
2023/11/27 09:27:40 Refreshing interfaces for capturing...
2023/11/27 09:27:50 Refreshing interfaces for capturing...
2023/11/27 09:28:00 Refreshing interfaces for capturing...
2023/11/27 09:28:10 Refreshing interfaces for capturing...
2023/11/27 09:28:20 Refreshing interfaces for capturing...
2023/11/27 09:28:30 Refreshing interfaces for capturing...
2023/11/27 09:28:40 Refreshing interfaces for capturing...
2023/11/27 09:28:50 Refreshing interfaces for capturing...

Here are Logs from the init container:

kubectl logs k8spacket-gll8f -c init-k8spacket
Connecting to k8spacket.s3.eu-central-1.amazonaws.com (3.5.135.183:443)
wget: note: TLS certificate validation not implemented
wget: server returned error: HTTP/1.1 404 Not Found

from k8spacket.

k8spacket avatar k8spacket commented on May 29, 2024

Hi @Tim-herbie

It's because this plugin is not available at this moment.
It was a temporary version needed for the issue only and this version with ports is not maintained according to the disadvantages written in the above post #26 (comment)

from k8spacket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.