Re: Problems to see the bandwidth correctly with mrtg
Posted: Thu Nov 30, 2017 6:39 am
the only thing I need is to measure the actual bandwidth of a port on my cisco switch. with any tool but I want to see the real value in mb.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
./check_iftraffic64.pl -H 192.168.5.1 -C xx -i 11
OK - Average IN: 312.00B (0.00%), Average OUT: 312.00B (0.00%)Total RX: 632.12MBytes, Total TX: 632.12MBytes|inUsage=0.00%;85;98 outUsage=0.00%;85;98 inBandwidth=312.00B outBandwidth=312.00B inAbsolut=632117694c outAbsolut=632118802c
Code: Select all
-u, --units STRING
g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
or -O are used.Code: Select all
-B, --bits FLAG
Display results in bits per second b/s (default: Bytes/s)Code: Select all
./check_iftraffic64.pl -H 172.16.100.190 -C public -i GigabitEthernet1/0/25 -BUsage: check_iftraffic64.pl -H host [ -C community_string ] [ -i if_index|if_descr ] [ -r ] [ -b if_max_speed_in | -I if_max_speed_in ] [ -O if_max_speed_out ] [ -u ] [ -B ] [ --32bit ] [ -f ] [ -A IP Address ] [ -L ] [ -M ] [ -w warn ] [ -c crit ] [ -v 1|2|3 ] [ --username <username> ] [ --authpassword <authpassword> ] [ --authprotocol MD5|SHA ] [ --privpassword <privpassword> ] [ --privprotocol DES|AES|3DES ]
Example 1: check_iftraffic64.pl -H host1 -C sneaky
Example 2: check_iftraffic64.pl -H host1 -C sneaky -i "Intel Pro" -r -B
Example 3: check_iftraffic64.pl -H host1 -C sneaky -i 5
Example 4: check_iftraffic64.pl -H host1 -C sneaky -i 5 -B -b 100 -u m --32bit
Example 5: check_iftraffic64.pl -H host1 -C sneaky -i 5 -B -I 20 -O 5 -u m
Example 6: check_iftraffic64.pl -H host1 -C sneaky -A 192.168.1.1 -B -b 100 -u m
Example 7: check_iftraffic64.pl -H host1 -C sneaky -A 192.168.1.1 --force --32bit
Example 8: check_iftraffic64.pl -H host1 --username admin --authpassword sneaky
Example 9: check_iftraffic64.pl -H host1 --username admin --authpassword sneaky123 --privpassword reallysneaky --privprotocol 3DES
Options:
-b, --bandwidth INTEGER
-I, --inBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
both IN and OUT if out (-O) max speed is not provided. Requires -u.
-O, --outBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
OUT traffic. Uses the same units value given for -b. Requires -u.
-i, --interface STRING
Interface Name
-M, --max INTEGER
Max Counter Value (in bits) of net devices in giga/mega/kilo/bits. Requires -u.
-r, --regexp
Use regexp to match NAME in description OID
-u, --units STRING
g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
or -O are used.
-A, --address STRING (IP Address)
IP Address to use when determining the interface index to use. Can be
used when the index changes frequently or as in the case of Windows
servers the index is different depending on the NIC installed.
-C, --community STRING
SNMP Community.
-H, --host STRING or IPADDRESS
Check interface on the indicated host.
-c, --critical INTEGER
% of bandwidth usage necessary to result in critical status (default: 98%)
-w, --warning INTEGER
% of bandwidth usage necessary to result in warning status (default: 85%)
--32bit FLAG
Set to use 32 bit counters instead of 64 bit (default: 64 bit).
-B, --bits FLAG
Display results in bits per second b/s (default: Bytes/s)
-f, --force FLAG
Set to force either 64 bit or 32 bit only checking (32 bit requires --32bit flag).
-d, --debug INTEGER
Output some debug info, not supported inside of Nagios but may be useful
from the command line. Levels 1-4 can be specified, 4 being the most information.
-h, --help
Displays this help text
-L, --list FLAG (on/off)
Tell plugin to list available interfaces. This is not supported inside
of Nagios but may be useful from the command line.
-v, --Version STRING
Set SNMP version (defaults to 2). Version 2 or 3 required for 64 bit counters.
--authpassword STRING
Set v3 authorization password.
--authprotocol STRING
Set v3 authorization protocol (default: MD5).
--privpassword STRING
Set v3 privilege (encryption) string.
--privprotocol STRING
Set v3 privilege (encryption) protocol (default: DES).