Page 3 of 3

Re: plugin output ommited

Posted: Thu Aug 23, 2018 5:11 am
by amprantino
danjoh wrote:May I ask where you have downloaded this check?

The one I find @ConSol Labs does not have some of the command-line parameters that you use (E.g. --mode=database-data-free, --commit and --nooffline).
I got it from their official site:
./check_mssql_health -h
check_mssql_health $Revision: 2.6.4.14 $ [http://labs.consol.de/nagios/check_mss_health]

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).
The above URL is wrong. The correct one is this: https://labs.consol.de/nagios/check_mssql_health/

Re: plugin output ommited

Posted: Thu Aug 23, 2018 5:17 am
by amprantino
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
Snap3.png (4.47 KiB) Viewed 3225 times
Is nagios interpreting "\n" to the webinterface for some reason?

Re: plugin output ommited

Posted: Thu Aug 23, 2018 5:51 am
by danjoh
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.

Maybe you should open a issue on github https://github.com/lausser/check_mssql_health/issues.

Re: plugin output ommited

Posted: Thu Aug 23, 2018 7:03 am
by scottwilkerson
amprantino wrote:Is nagios interpreting "\n" to the webinterface for some reason?
Yes, the GUI would interpret \n as a new line

Re: plugin output ommited

Posted: Mon Aug 27, 2018 7:28 am
by amprantino
scottwilkerson wrote:
amprantino wrote:Is nagios interpreting "\n" to the webinterface for some reason?
Yes, the GUI would interpret \n as a new line
Thx - I will open a ticket there for some issues. I couldn't find a link to github from their official site.

Re: plugin output ommited

Posted: Mon Aug 27, 2018 8:01 am
by scottwilkerson
amprantino wrote:
scottwilkerson wrote:
amprantino wrote:Is nagios interpreting "\n" to the webinterface for some reason?
Yes, the GUI would interpret \n as a new line
Thx - I will open a ticket there for some issues. I couldn't find a link to github from their official site.
Sounds good