Page 1 of 1
Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Thu Feb 17, 2011 11:41 am
by atlantic
Good morning,
Once you have added a switch (for example) to Nagios XI for monitoring using "Config Wizard" Network Switch, it defines multiple services for that newly added switch. What is the recommended method for adjusting the Bandwidth threshold in the service definitions?
When you select "Service Detail" for the "Home" screen, and then enter a specific host in the search box, it brings up the details for that host's services. You can drill down on the service to get the "Service Status Detail", there is a tab "Configure", under "Configure" you can choose to 're-configure' the service. The first screen after choosing the 're-configure this service' option is a tab "Monitoring" and that shows the actual Nagios XI monitoring command, for example.
Monitor the service with this command... (Advanced users only)
check_xi_service_mrtgraf!sw34-1.shz.aoo.pa.atlanticbb.net_10003rrd!20,20!50,50!M
What do the values on the end of this command represent?
Thank you,
Mark Frew
Re: Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Thu Feb 17, 2011 12:06 pm
by tonyyarusso
"sw34-1.shz.aoo.pa.atlanticbb.net_10003rrd" = -f Full path to RRD file to read data from
"20,20" = -w Warning threshold <rate> or pair <incoming>,<outgoing>
"50,50" = -c Critical threshold <rate> or pair <incoming>,<outgoing>
"M" = -l Data display label, one of B,K,M or G
You can look these types of things up by doing the following:
1) Go into the Core Config Manager
2) Under Services find the one you're interested in
3) If it has the check command defined, note that, otherwise note templates that are applied and look up the check command in them
4) Go under Commands and look up that command definition to find the real name of the plugin
5) Logged into the shell, run the command with the -h switch, like /usr/local/nagios/libexec/check_rrdtraf -h
6) Compare the switches described in the help output to those used in the command definition
So in this case, check_xi_service_mrtgraf is defined as follows:
$USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
$USER1$ is /usr/local/nagios/libexec, and ARGs 1 through 4 match up to the four fields separated by exclamation points on the reconfigure screen.
Re: Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Thu Feb 17, 2011 1:22 pm
by atlantic
Thanks so much Tony, I appreciate the information.
Mark
Re: Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Thu Feb 17, 2011 4:14 pm
by rdedon
Just contact us again if you have any issues or questions.

Re: Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Fri Feb 18, 2011 9:19 am
by atlantic
Thank you again for the prompt response.
I have just a couple quick follow-up questions. Is the "Warning" and "Critical" threshold metric measured in percentages of bandwidth usage?
Also, and I confess, this question is more involved. If I have already added a fair number of switches/routers (approx. 100), what are my options/recommendations for "retro-fitting" services that have already been defined via the "Network Switch/Router" Config Wizard. At this point, they are globally assign "20,20" and "50,50", and the network engineers would like me to adjust these numbers.
I hope I explained my myself clearly enough.
Mark
Re: Tweaking Services -- Adjusting Bandwidth thresholds
Posted: Fri Feb 18, 2011 10:52 am
by mguthrie
I have just a couple quick follow-up questions. Is the "Warning" and "Critical" threshold metric measured in percentages of bandwidth usage?
Here's what pulled from the ./check_rrdtraf --help command.
Code: Select all
Usage:
check_rrdtraf -f <rrd_file> -w <warning_pair> -c <critical_pair>
[-v][-e expire_seconds] [-l label_units]
check_rrdtraf (-V | --version)
check_rrdtraf (-h | --help)
Options:
-h, --help
Print detaiiled help screen
-V, --version
Print version information
-v Verbose output. Can be specified twice for more verbosity
-vv More verbose output, same as -v -v
-f Full path to RRD file to read data from
-w Warning threshold <rate> or pair <incoming>,<outgoing>
-c Critical threshold <rate> or pair <incoming>,<outgoing>
-e Log age threshold (in seconds, 5min=300)
-l Data display label, one of B,K,M or G
Notes:
-Warning and critical thresholds are MAX values,
going above the threshold will trigger an alert.
-Labels and units for warning and critical values
are determined by the -l argument (if specified):
B=bps; K=Kbps; M=Mbps; G=Gbps
-If the -l switch is specified, input values are assumed to
be in the same units as specified in the -l switch
-If the -l switch is not specified, output values are scaled
appropriately, and input values are assumed to be in Kbps
Also, and I confess, this question is more involved. If I have already added a fair number of switches/routers (approx. 100), what are my options/recommendations for "retro-fitting" services that have already been defined via the "Network Switch/Router" Config Wizard. At this point, they are globally assign "20,20" and "50,50", and the network engineers would like me to adjust these numbers.
Do you want to tweak the numbers on a port by port basis, or are you looking to globally change those values? If you wanted the changes to be global, you'd have to set the command and all of the ARG values in the service template, and then clear those values from and services that you want to use those global values. I know that's a pain now that you've probably got a ton of services to go through, but that'd be the way to manage a global setting as you add more checks. Right now we don't have a way to mass edit a set of values unless you happen to be an SQL whiz, in which case we'd let you experiment at your own risk ; )