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

nstat input plugin #1138

Closed
wants to merge 3 commits into from
Closed

nstat input plugin #1138

wants to merge 3 commits into from

Conversation

maksadbek
Copy link
Contributor

Plugin discussed here: #1104

@sparrc Plugin for nstat, could not use your nstat library because there was a bit misfit and required refactoring, but I used the your parsers.


var sampleConfig = `
# file paths
proc_net_netstat = "/proc/net/netstat"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think we should do the same thing nstat does: https://github.com/shemminger/iproute2/blob/master/misc/nstat.c#L46,

which is:

  1. Use overrides here (but default to "")
  2. try PROC_NET_NETSTAT env var
  3. try PROC_ROOT env var + "net/netstat"
  4. use "/proc/net/netstat"

@maksadbek
Copy link
Contributor Author

Hi @sparrc, I have fixed code, the paths for files are read as follows:

  1. Try to read from config, default is ""
  2. Try to read paths from env
  3. Try to read PROC_ROOT and append default paths
  4. use default paths: /proc/net/netstat, /proc/net/snmp, /proc/net/snmp6

Wrote detailed documentation, what fields are collected and their tags.
Feel free to comment if I missed smth, any your suggestions are appreciated.

@sparrc sparrc closed this in dc89f02 May 17, 2016
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

Successfully merging this pull request may close these issues.

2 participants