plugin output ommited

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.
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: plugin output ommited

Post 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/
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: plugin output ommited

Post 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 3221 times
Is nagios interpreting "\n" to the webinterface for some reason?
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Re: plugin output ommited

Post 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.
--
D/\N
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: plugin output ommited

Post by scottwilkerson »

amprantino wrote:Is nagios interpreting "\n" to the webinterface for some reason?
Yes, the GUI would interpret \n as a new line
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: plugin output ommited

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: plugin output ommited

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked