No announcement yet.

Adapted for interface-checks and ADSL

  • Filter
  • Time
  • Show
Clear All
new posts

  • Adapted for interface-checks and ADSL

    I adapted the to my needs by adding some options and solving some bugs.
    Maybe somebody else could use these adaptations too so here it is.
    The attachment is check_graph_traffic.txt so it should be renamed to
    !!I only have Cisco routers so not tested on others!!
    The main reason for the changes is to be able to detect the up/down status of router-interfaces and to cope with ADSL lines that have different in and outgoing speeds.
    With the -o option it is now possible to check the status of several interfaces. You can use the -s option to get the right interface-numbers.
    If one of them is down the status will be critical. For example this way you can detect that your internet line is down at the router-level and it shows at what level it is down (ATM, Dialer, Virtual-Access etc).
    With -T you can override the interface-speed (both in and out bits/sec), sometimes the ifSpeed value in SNMP is not correct (for example wrong bandwidth setting in Cisco).
    If the outgoing speed is different from the ingoing (often with ADSL) then you can use -u to specify the outgoing bits/sec.
    Because these options are ignored when the value is 0 you don't need to define several command_lines for all possible combinations.

    This is from the help output:
    -o Optional comma separated string of interface-numbers to check up/down status on
    for example "-o 1,9,14".
    The value "0" will be ignored (to limit the number of check-commands needed).
    -T Optional bandwidth in bits/sec (otherwise the SNMP ifSpeed is used)
    The value "0" will be ignored (to limit the number of check-commands needed).
    -u Optional outgoing bandwidth in bits/sec
    (otherwise the -T value is used, or else the SNMP ifSpeed is used)
    The value "0" will be ignored (to limit the number of check-commands needed).

    Example of usage on a ADSL router:
    command_line $USER1$/ -H $HOSTADDRESS$ -i $ARG1$ -w $ARG2$ -c $ARG3$ -C $ARG4$ -v $ARG5$ -g -o $ARG6$ -T $ARG7$ -u $ARG8$ -S $ARG9$
    check_command check_graph_traffic!18!90!96!notpublic!1!1,18!0!73 6000

    The host of this service is the ethernet-interface of the router.
    * -i 18 : use interface 18 (BVI1) in/out packetcounter
    * -w 90 : 90% usage is warning
    * -c 96 : 96% usage is critical
    * -C notpublic : SNMP community is notpublic
    * -v 1 : SNMP version 1
    * -o 1,18 :check the status (ifOperStatus) from the interfaces 1 (ATM0) and 18 (BVI1)
    * -T 0 : use the SNMP value ifSpeed for the bandwidth
    * -u 736000 : the download speed is 736000 bits/sec instead of the SNMP value ifSpeed

    Output of the command:
    # ./ -H -i 18 -w 90 -c 96 -C notpublic -v 1 -o 1,18 -T 0 -u 736000
    ATM0=UP BVI1=UP Traffic In : 96.77 kb/s (4.7 %), Out : 23.45 kb/s (3.2 %) - Total RX Bits In : 9.52 Gb, Out : 12.73 Gb|traffic_in=96770.3bits/s traffic_out=23449.7bits/s

    Hope this is of use to some of you too.

    Menno van Bennekom
    Attached Files
    Last edited by Menno; 30 January 2007, 15:04. Reason: first 2 lines were duplicated

  • #2
    Thank you !!!!
    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
    Fedora Core 5 - 2.6.20-1.2320