check_nt -s: what is the password for?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nt -s: what is the password for?

Post by ssax »

Please try these and let us know the results:

Code: Select all

/usr/local/nagios/libexec/check_nt -H txslm2mwsql001 -s "frAQBc8Wsa1xVPfv" -p 12489 -v COUNTER -l '\\\\Database\(svchost\)\\Database Cache % Hit'
Also, I think that you don't have to escape it when running from the command line:

Code: Select all

/usr/local/nagios/libexec/check_nt -H txslm2mwsql001 -s "frAQBc8Wsa1xVPfv" -p 12489 -v COUNTER -l '\\Database(svchost)\Database Cache % Hit'
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: check_nt -s: what is the password for?

Post by gormank »

Interesting. I've gotten a few others to work but getting the counter strings from the perfmon GUI isn't fun. There's a list command that I didn't get to work last week--I need to revisit that.
Still, this indicates I have a syntax problem on the cache rather than a systemic issue... It looks like less escaping works.

/usr/local/nagios/libexec/check_nt -H sqlgost-s "passwd" -p 12489 -v COUNTER -l "\\Database ==> Instances(svchost/_Total)\\Log Files Generated"
451

/usr/local/nagios/libexec/check_nt -H sqlgost-s "passwd" -p 12489 -v COUNTER -l "\\ICMP\\Messages Outbound Errors"
0

# /usr/local/nagios/libexec/check_nt -H sqlgost-s "passwd" -p 12489 -v COUNTER -l "\\Server\\Files Open"
4

Less quoting and the cache hit works:

# /usr/local/nagios/libexec/check_nt -H sqlgost-s "passwd" -p 12489 -v COUNTER -l "\\Database(svchost)\\Database Cache % Hit"
0

If bounces between 0 and 100%.

This can be closed...
Thanks!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_nt -s: what is the password for?

Post by mcapra »

Thanks for sharing your findings! Closing this per your request
Former Nagios employee
https://www.mcapra.com/
Locked