Nagios XI Alert for low or no bandwidth

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Nagios XI Alert for low or no bandwidth

Post by rbuckle »

How can you configure a probe to alert when the bandwidth through a monitored drops below a certain level?
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios XI Alert for low or no bandwidth

Post by rkennedy »

You should be able to use a different parameter in your warning / critical thresholds, for you it would be appending a :, which represents <.

See this link for more info - https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Former Nagios Employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI Alert for low or no bandwidth

Post by ssax »

I've modified the plugin to add a new option -L (see attached) that will change it from greater than to less than, please test it out and let me know if that works.
check_rrdtraf_less.zip

Code: Select all

/usr/local/nagios/libexec/check_rrdtraf2 -f /var/lib/mrtg/192.168.X.X_1.rrd -w 1 -c 25 -l M -L
You do not have the required permissions to view the files attached to this post.
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios XI Alert for low or no bandwidth

Post by rbuckle »

i tried using both methods but could not get it to not be a greater than alert
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Alert for low or no bandwidth

Post by lmiltchev »

What is not working for you? Can you elaborate?

I just tried the modified plugin provided by ssax, and it works just fine for me.
Example:

Code: Select all

[root@localhost libexec]# /usr/local/nagios/libexec/check_rrdtraf2 -f /var/lib/mrtg/192.168.x.x_7.rrd -w 1 -c 1 -l M
OK - Current BW in: .05Mbps Out: .08Mbps|in=.059158Mb/s;1;1 out=.080785Mb/s;1;1
[root@localhost libexec]# /usr/local/nagios/libexec/check_rrdtraf2 -f /var/lib/mrtg/192.168.x.x_7.rrd -w 1 -c 1 -l M -L
CRITICAL - Current BW in: .05Mbps Out: .08Mbps|in=.059158Mb/s;1;1 out=.080785Mb/s;1;1
Be sure to check out our Knowledgebase for helpful articles and solutions!
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios XI Alert for low or no bandwidth

Post by rbuckle »

This is what i get

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_rrdtraf_less -f /var/lib/mrtg/10.0.0.27_5.rrd -w 5 -c 5 -l M -L
OUTPUT: CRITICAL - Current BW in: 7.94Mbps Out: 46.88Mbps|in=7.944299Mb/s;5;5 out=46.888900Mb/s;5;5
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Alert for low or no bandwidth

Post by lmiltchev »

Yeah, it seems like ssax's solution works only if the actual value is above the specified threshold but not when it is below it. Our developers will be looking this this.

For the time being, as a "workaround", you could try using the negate plugin with the original check_rrdtraf plugin (not ssax's version). Using the negate is pretty much straight forward. Here's our documentation on negate:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Hope this helps. Let us know if you get stuck on something.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios XI Alert for low or no bandwidth

Post by rbuckle »

so do i have to create the plugin for the command? then create the command? or is it

Code: Select all

$USER1$/negate $USER1$/check_rrdtraf_bits -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Alert for low or no bandwidth

Post by lmiltchev »

You can also use:

Code: Select all

negate 	$USER1$/negate -s --ok=CRITICAL $USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
This way, the output text will be also substituted (from OK to Critical).
Be sure to check out our Knowledgebase for helpful articles and solutions!
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios XI Alert for low or no bandwidth

Post by rbuckle »

lmiltchev wrote:You can also use:

Code: Select all

negate 	$USER1$/negate -s --ok=CRITICAL $USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
This way, the output text will be also substituted (from OK to Critical).
This gives me a blank reply
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
Locked