Page 1 of 2
Performance counters threshold not working
Posted: Wed Jul 13, 2016 5:47 am
by Naveed
Hello,
I am monitoring my performance counters on windows servers with check_nrpe.
I am using the following command, monitoring is fine but thresholds are not working/
check_nrpe_sql!CheckCounter!'Counter=\SQLServer:Databases(AXSupportUAT)\Log File(s) Size (KB)'!"ShowAll" "MaxWarn=10" "MaxCrit=30"!!!!!
Kindly suggest something!
Thank you!
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:15 am
by rkennedy
Can you show us the full output from the check? I wonder if there is a decimal in there somewhere.
Also, please show us a screenshot of the counter in Performance Monitor so that we can see how the values are set currently.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:20 am
by Naveed
Hello,
I have checked it, its working fine from command line, but still it does not have any impact from CCM.
From CLI
[root@AXmonitor libexec]# ./check_nrpe -H 40.78.100.159 -c CheckCounter -a 'Counter=\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)' Showall MaxWarn=5276024 MaxCrit=6078025
CRITICAL: \SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB) = 6276024|'\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)none'=6276024;5276024;6078025
[root@AXmonitor libexec]# ./check_nrpe -H 40.78.100.159 -c CheckCounter -a 'Counter=\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)' Showall MaxWarn=5276024 MaxCrit=6578025
WARNING: \SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB) = 6276024|'\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)none'=6276024;5276024;6578025
[root@AXmonitor libexec]# ./check_nrpe -H 40.78.100.159 -c CheckCounter -a 'Counter=\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)' Showall MaxWarn=6376024 MaxCrit=6578025
OK: \SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB) = 6276024|'\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)none'=6276024;6376024;6578025
From CCM
check_nrpe_sql!CheckCounter!'Counter=\SQLServer:Databases(AsyncServerDB)\Log File(s) Size (KB)'! Showall MaxWarn= 6276024 MaxCrit= 6378024!!!!!
Kindly see and let me know what goes wrong in configurations?
Thank you!
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:23 am
by rkennedy
Are you using the test check command, or letting it run its full course? The test check command is not reliable, FYI.
If it's running the full course, you may need to add some escaping in.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:26 am
by Naveed
No I am not using test command.
I have defined service in nagios and screenshots are attached. Service is in Ok state, but not accepting thresholds.
Screenshots are attached.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:29 am
by rkennedy
You need to modify the command check_nrpe_sql and add $ARG3$ to the end of it (seperated by a space), so that it will be accepted in your service check_command.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 10:41 am
by Naveed
That did not work for me.
Thrown a error message.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 11:00 am
by rkennedy
Take a look at the NSClient++ log file on the client machine, and see what it says the issue is. What does it say?
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 11:04 am
by Naveed
Upon next check, issue gets resolved, all my services are now taking external threshold.
One service which thrown that error is being edited with running service.
Problem resolved now.
One important question is that we are getting counter size in kb and implementing thresholds in Kbs after calculating it.
Is there any way of defining threshold with percentage, I mean if usage > 80 its shows warning and usage > 90 than showed critical.
By doing this, I would not need to manually calculate and implement thresholds.
Many thanks
Much appreciated.
Re: Performance counters threshold not working
Posted: Wed Jul 13, 2016 12:02 pm
by rkennedy
The counter would need to be returning the value in a % form, not a raw number. Some counters actually will return the % and that's when you can set your thresholds based on them.
The issue with setting up percent based thresholds on the checkcounter value, is that each counter is going to be different. Nagios does not know what the max number your specific counter should go up to. It could go up to 5,000, or 5,000,000. You'll need to set static thresholds accordingly for this.