On 25 June 2013 07:03, B-Art Gillis <bacaselo at gmail.com> wrote:
Thank you for your answer but I just saw on the graph that the values are converted to rrd data seem to come from the "do_netstat.c" module.
No, if you want interface statistics then you want ifstat parsed in do_ifstat.c. If you want protocol statistics (layer 3 and above such as TCP and UDP) then you would want a [netstat] section parsed in do_netstat.c. The message example you gave shows interface statistics.
Xymon expects the format to match ifstat_bbwin_exprs[] (defined in do_ifstat.c). This includes an IP address then the in and out byte count. The output of "netstat -e" does not provide an IP address, and it provides much more than just the bytes in and out. You'd have to select the Bytes line and prefix it with an IP address (probably a dummy device name would do also).
Something like:
EthDev 144681781 42531845
Any whitespace can be used as separators (one or more tabs or spaces).
You could probably get away with this:
echo [netstat] & netstat -e | find "Bytes"
This would give "Bytes" as a devicename, but I don't think it would break anything.
You need to prefix this message with the correct "client" message header. If you're sending other client data, this should be included with that message, otherwise one will mask the other.
The client message might look something like this:
client server1.win32 [netstat] Bytes 144681781 42531845
To get Xymon to match against the bbwin match string, you have to report your OS in the message as "bbwin" or "win32". This is probably why you're getting the "reports netstat for an unknown OS" message.
J