Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
This monitoring plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU
General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
scottwilkerson wrote:I agree something certainly is not correct, the examples with | tee -a /tmp/TEST1 shows the command is displaying in Nagios exactly what is being output from the command when Nagios runs it.
Check also this output:
./check_mssql_health --server 'sqlserer\PROD' --port 12345--username 'gateway\nagiossql' --password 'XXXXXXXXX' --commit --mode connection-time
OK - 0.01 seconds to connect as gateway\nagiossql | 'connection_time'=0.01;1;5;;
What I see to nagios web interface is this:
Snap3.png (4.47 KiB) Viewed 3220 times
Is nagios interpreting "\n" to the webinterface for some reason?
As @scottwilkerson wrote, when you added | tee -a /tmp/TEST1 you can see exactly what the output from the command is (including any \n).
And as you wrote, the only output in TEST1 (and TEST2) where OK - hence it looks like the problem lies in the check_mssql_health script.