Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Martin

Current Version
1.0
Last Release Date
2013-10-16
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
  • Nagios Reactor
License
GPL
Hits
32613
Files:
FileDescription
check_mtrcheck_mtr
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
nagios plugin for monitoring mtr requires ruby should work with 1.8.x - 2.x

Usage: check_mtr [options]
-h prints this menu
-H, --host HOST which host to run mtr on
-l, --latency_warn MS latency to trigger warning in ms
-L, --latency_crit MS latency to trigger critical in ms
-p, --packet_loss_warn PERCENT packet lost percent to trigger warning
-P, --packet_loss_crit PERCENT packet loss percent to trigger critical
-c, --count NUM number of times to ping host with
mtr
Reviews (3)
bynull, November 14, 2016
I get , when is expected.
But I also get , when is expected -> see below:

# ./check_mtr -H 192.168.92.248 -c 5 -p 1 -P 2 -l 1 -L 2
OK
mtr --no-dns -i 2 -t 192.168.92.248 --report -c 5 --report-wide
HOST: HOS-BOA-MGMT01 Loss% Snt Last Avg Best Wrst StDev
1. 192.168.60.1 0.0% 5 0.6 0.6 0.6 0.6 0.0
2. 172.16.1.1 0.0% 5 0.5 0.4 0.4 0.5 0.0
3. 172.16.1.13 0.0% 5 0.6 0.6 0.6 0.8 0.1
4. 172.16.1.14 20.0% 5 1.2 1.1 1.1 1.2 0.1
5. ??? 100.0 5 0.0 0.0 0.0 0.0 0.0

In the above example, I would expect , but still get .

.. Any idea?
bystamatisl, March 24, 2016
I have the same bug and i've changed line 52 from this:

re = /^\s*(\d*).\|--\s*(\S*).*?(\d*?.\d*?)%\s*.*?\d\s+(.*?)\s.*?$/

to this:

re = /^\s*(\d*).\s*(\S*).*?(\d*?.\d*?)%\s*.*?\d\s+(.*?)\s.*?$/

Everything it's working now!
byMajed, March 12, 2014
/usr/lib/nagios/plugins# ./check_mtr -H 94.x.y.z
./check_mtr:54:in `run_mtr': undefined method `captures' for nil:NilClass (NoMethodError)
from ./check_mtr:50:in `each'
from ./check_mtr:50:in `run_mtr'
from ./check_mtr:11:in `initialize'
from ./check_mtr:136:in `new'
from ./check_mtr:136

there is a bug in the script. i ran it under latest ubuntu after installing ruby.