Page 2 of 2

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

Posted: Mon Jul 11, 2016 3:21 pm
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'

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

Posted: Mon Jul 11, 2016 3:28 pm
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!

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

Posted: Mon Jul 11, 2016 3:31 pm
by mcapra
Thanks for sharing your findings! Closing this per your request