Better write_fifo.c ?
Hugo van der Kooij
hvdkooij at vanderkooij.org
Fri Apr 7 23:37:01 CEST 2006
Hi,
In my pursuit in getting performance graphs working it seems the culprit
is in fact the tool for writing to the fifo.
If I use the perl version I am missing entries being send to the named
pipe. (Using a loglevel of 36 seems to be the right way to trace this.)
If I replace the perl script with the compiled C version it seems all the
data is send to the named pipe. But the C program fails to properly
terminate the lines as it only converts \t to tabs but ignores the \n at
the end.
This in fact leads to entries in the named pipe which are logged like:
2006-04-07 23:07:38 PIPE: arwen SSH TCP OK - 0.009 second response time on port 22 time=0.008775s;0.000000;0.000000;0.000000;10.000000arwen LOAD OK - load average: 0.04, 0.11, 0.07 load1=0.040;3.000;6.000;0; load5=0.110;2.500;5.000;0; load15=0.070;2.000;4.000;0;
(That's 1 long line.)
One may notice the double event into a single line.
Due to my poor C writing skills I am unable to fix this little gem myself.
But perhaps someone could look at
http://www.nagiosexchange.org/Charts.42.0.html?&tx_netnagext_pi1[p_view]=195
and see if they can improve upong the shown 'fifo_write.c' and add the
ability to handle \n and convert it into a newline character in the
output.
Hugo.
--
I hate duplicates. Just reply to the relevant mailinglist.
hvdkooij at vanderkooij.org http://hvdkooij.xs4all.nl/
Don't meddle in the affairs of magicians,
for they are subtle and quick to anger.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list