Question regarding threshold and ranges.

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.
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Question regarding threshold and ranges.

Post by kaushalshriyan »

Hi,

I am referring to https://nagios-plugins.org/doc/guidelin ... SHOLDFORMA, what does 10: mean? Generate an alert if x... < 10, (outside {10 .. ∞}). Not sure if i understand it completely. I will appreciate if you can help me understand with some examples.

what does {10 .. ∞} mean?

Thanks in Advance.

Regards,

Kaushal
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question regarding threshold and ranges.

Post by tmcdonald »

That is just saying "counting from 10 up to infinity" and is a fancy way of saying "less than 10".
Former Nagios employee
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Question regarding threshold and ranges.

Post by kaushalshriyan »

Hi Trevor McDonald,

So what i understand is that Nagios will trigger an alert if the value is less than 10. Please correct me if i am understand it completely wrong.

Regards,

Kaushal
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question regarding threshold and ranges.

Post by tmcdonald »

It is actually the plugin that determines the alert thresholds, not Nagios itself. You configure a command which runs a plugin and passes in certain thresholds, but it is up to the plugin to gather the relevant metrics and make the comparison. If the plugin was not written to respect a certain threshold format, then Nagios won't know to alert.
Former Nagios employee
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Question regarding threshold and ranges.

Post by kaushalshriyan »

Thanks Trevor for the explanation. Apologies for reiterating. So from the below details Nagios plugin (in nrpe.cfg) will trigger an alert notification if the value is below 18 in case of warning and if the value is below 15 in case of critical.

command[check_rabbitmq_emailqueue]=/usr/lib/nagios/plugins/check_rabbitmq_queue -H localhost --user=admin --password=xxxxxxxx --vhost=/ --queue emailqueue --warning=100,100,100,18: --critical=200,200,200,15:

Please correct me if i am understand it completely wrong.

Regards,

Kaushal
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question regarding threshold and ranges.

Post by tmcdonald »

It will entirely depend on how the plugin was written. I would need to see either the source code or the help output for the check_rabbitmq_queue plugin.
Former Nagios employee
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Question regarding threshold and ranges.

Post by kaushalshriyan »

Hi Trevor,

Nagios rabbitmq plugin link :- https://github.com/nagios-plugins-rabbi ... s-rabbitmq

Regards,

Kaushal
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question regarding threshold and ranges.

Post by tmcdonald »

Those thresholds are correct according to the plugin development guidelines, and it would appear the plugin does respect those formats:

https://github.com/nagios-plugins-rabbi ... #L318-L326

You should of course still check the output of running the plugin though to make sure.
Former Nagios employee
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Question regarding threshold and ranges.

Post by kaushalshriyan »

Thanks Trevor for the explanation. So as per the below example nagios plugin will trigger an alert if the value of consumers are below 10?

For example to be crtical if more than 100 messages, more than 90 messages_ready, more than 20 messages_unacknowledged or no fewer than 10 consumers use --critical=100,90,20,10:

And as per my settings in nrpe.cfg, Nagios plugin will trigger an alert notification if the value is below 18 in case of warning and if the value is below 15 in case of critical?

command[check_rabbitmq_emailqueue]=/usr/lib/nagios/plugins/check_rabbitmq_queue -H localhost --user=admin --password=xxxxxxxx --vhost=/ --queue emailqueue --warning=100,100,100,18: --critical=200,200,200,15:

Please correct me if i am understand it completely wrong. Just want to be doubly sure to understand the concept. It is little confusing. Thanks in Advance.

Regards,

Kaushal
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Question regarding threshold and ranges.

Post by tacolover101 »

kaushalshriyan wrote:Thanks Trevor for the explanation. So as per the below example nagios plugin will trigger an alert if the value of consumers are below 10?

For example to be crtical if more than 100 messages, more than 90 messages_ready, more than 20 messages_unacknowledged or no fewer than 10 consumers use --critical=100,90,20,10:

And as per my settings in nrpe.cfg, Nagios plugin will trigger an alert notification if the value is below 18 in case of warning and if the value is below 15 in case of critical?

command[check_rabbitmq_emailqueue]=/usr/lib/nagios/plugins/check_rabbitmq_queue -H localhost --user=admin --password=xxxxxxxx --vhost=/ --queue emailqueue --warning=100,100,100,18: --critical=200,200,200,15:

Please correct me if i am understand it completely wrong. Just want to be doubly sure to understand the concept. It is little confusing. Thanks in Advance.

Regards,

Kaushal
i think it's only expecting one critical, but i could be missing something. usually it'd simply be 10: or 15: to reverse thresholds. honestly, the only way to know is try it out and record the result from your testing. it really varies between different plugins.
Locked