Page 1 of 1

Check command thresholds

Posted: Wed Apr 19, 2023 4:53 pm
by InfraSND
Hi,

Wondering if it is possible for a check command that has multiple possible values for error feedback to trigger warnings and critical.

I have found the information about defining thresholds, but what it doesn't explain for me is if I can do multiple vaules...

Example, I have an SNMP feedback for HDD monitoring, I want SNMP return values 6,7,24,34 to trigger a warning and values 0,2,4,11,39,41,53 to trigger a critical. I have used the following as my syntax

-w @5:8,@23:25,@33:35 -c 1:,@1:3,@3:5,@10:12,@38:40,@40:42,@52:54

is this correct?

Thank you for any assistance...

Re: Check command thresholds

Posted: Thu Apr 20, 2023 9:13 pm
by kg2857
This depends on the plugin defined in the command. Nagios sets status based on the return value of a check.

Re: Check command thresholds

Posted: Tue Apr 25, 2023 3:19 pm
by InfraSND
kg2857 wrote: Thu Apr 20, 2023 9:13 pm This depends on the plugin defined in the command. Nagios sets status based on the return value of a check.
Thankyou for your response

I am using the check_snmp command, however what I have found with testing is that when I have multiple thresholds it doesn't recognize the defined values as I mentioned in my question.

What I have done in the mean time is create individual services using the check_snmp command with a single defined threshold, it means a lot more programming but it seems the only way for me to proceed. I was trying to find a way of simplifying the process as each drive will require 11 services...

Cheers

Re: Check command thresholds

Posted: Wed Apr 26, 2023 6:26 pm
by kg2857
Have a look at the plugins web page referenced at the end of check_snmp -h. It suggests that multiple -w and -c options can be defined.
It's still a bit gruesome but it might work depending on whether check_snmp conforms to the document.

Re: Check command thresholds

Posted: Tue May 09, 2023 9:50 pm
by raftmore
See whether Check_snmp conforms to the document.

coreball

Re: Check command thresholds

Posted: Tue Aug 08, 2023 10:02 pm
by llucklinn
If you could provide more information about the context in which you're encountering these "command thresholds," I would be happy to help you further. Please specify the system, software, or scenario you're referring to so that I can provide a more detailed response or solution.
magic tiles 3