Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telegraf-ds] inputs.net provides no data #636

Open
yellowpattern opened this issue Apr 17, 2024 · 4 comments
Open

[telegraf-ds] inputs.net provides no data #636

yellowpattern opened this issue Apr 17, 2024 · 4 comments

Comments

@yellowpattern
Copy link

After getting telegraf to start providing data as a daemon set, I then tried to get some network information (it isn't included in the default set of metrics) by adding this to the configMap:

[[inputs.net]]
  ignore_protocol_stats = true
  interfaces = [ "ens*"]

But there's nothing. No output anywhere.

@yellowpattern
Copy link
Author

Sorry, I lie, I get statistics for "eth0" but not the physical interfaces.

@yellowpattern
Copy link
Author

yellowpattern commented Apr 17, 2024

If I add:

...
      volumeMounts:
        - name: procnet
          mountPath: /tmp/net
...
      volumes:
        - name: procnet
          hostPath:
            path: /proc/net
            type: ''

Then I can see the real devices in /tmp/net/dev but I can't mount that in /proc/net.

@yellowpattern
Copy link
Author

yellowpattern commented Apr 17, 2024

The config sets HOST_PROC to be /hostfs/proc BUT /hostfs/proc/net/dev is the same as /proc/net/dev. Problem: /proc can't be ounted under /proc. Fixing this requires something like shirou/gopsutil#1625

@yellowpattern
Copy link
Author

I found a way...

spec:
...
  template:
...
    spec:
...
      volumeMounts:
        - name: procnet
          mountPath: /hostfs/proc/net
...
      volumes:
        - name: procnet
          hostPath:
            path: /proc/net
            type: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant