After upgrading nagios-plugins to 1.4 I encountered some trouble. It incorretly handles locales, so can't properly parse ping output (and probably output from /proc/loadavg also). Solution is to upgrade to 1.4.1 ASAP.
I see whats going on. I need to add a nls use flag and configure option to the ebuild. I'll do that this morning if I've got time. Thanks for pointing that out!
Created attachment 68359 [details, diff] nagios-plugins-1.4.ebuild.patch Can you try this patch and enable the nls use flag? Let me know if this works, thanks!
Sorry for the delay. Unfortunately patch doesn't help. Still: gollum nagios-plugins # /usr/nagios/libexec/check_ping -H 127.0.0.1 -w 30,1% -c 50,10% /bin/ping -n -U -w 10 -c 5 127.0.0.1 CRITICAL - Could not interpret output from ping command
Does the solution provided in the sourceforge tracker fix the problem? Namely: ==== the problem seems to be in the parsing with scanf that when you are in locale that have the comma as decimal separator the scanf fail. I fixed replacing in all plugin that i nedd the line setlocale (LC_ALL, ""); with setlocale (LC_ALL, "C"); all now work fine!
And that is why upgrading to 1.4.1 is good solution, because it contains such fix :).
If thats the case, I'd like to wait a few more works to make sure 1.4.1 doesn't have more bugs in it. I did a few cleanups in the ebuild for that and wouldn't like any issues creep up without waiting a bit. For now, you can just keyword that ebuild until I feel more comfortable bumping 1.4.1 to stable.
OK. If it helps - nagios-plugins-1.4.1 works OK for over a week, checking about 300 services on over 100 hosts.
The same applies to check_procs.c, it fails to count processes (option -C). It can be fixed with setlocale (LC_NUMERIC, "C"); after setlocale (LC_ALL, ""); Maybe there are several other plugins that have the same problem.
I suggest not using check_ping, but check_icmp instead. It's widely known (upstream) that check_ping has those troubles.
This issue should be fixed in the latest stable version. Closing.