Back to OP5 Monitor FAQ

Internal documentation only

This page has been marked as draft.

Check_traffic information and examples

The “check_traffic” plugin for OP5 is used to monitor network traffic on various interfaces. It primarily connects to the OP5 Monitor API and queries a specific filter that is provided as an argument to the plugin. The plugin checks the amount of traffic on a network port, which can be useful for identifying unexpected traffic patterns or volumes.

Usage: check_traffic -H -<i|k|d|n> [options…] Copied

Where 'mode' must be 'traffic', 'errors' or 'status'.

Options (* = required; # = changeably required):
--debug Enable (lots) of debugging output
- -H --host <host> Hostname or ip to query
-C --community <str> SNMP community. Defaults to public
## -i --index <int> Interface index
## -k --key <int> Interface index
## -d --descr <str> Interface description (.1.3.6.1.2.1.2.2.1.2.*)
## -n --if-name <str> Interface name (.1.3.6.1.2.1.31.1.1.1.1.*)
-v --version <1|2c|3> SNMP protocol version (default: 1)
-t <int> Timeout in seconds (default: 15)
-r <int> Number of retries (default: 5)

SNMP v3 options:
-L --seclevel <str> 'noAuthNoPriv', 'authNoPriv' or 'authPriv'
-U --secname <str> username for SNMPv3 context
-c --context <str> SNMPv3 context name (default is empty string)
-a --authprot <str> Authentication protocol (md5 or sha1)
-A --authpass <str> Authentication password (cleartext ascii or
localized key in hex with 0x prefix generated
by using the 'snmpkey' utility)
Auth password and authEngineID
-X --privpass <str> Privacy password (same rules as for authpass)
-P --privproto <str> Privacy protocol (DES or AES; default: DES)
-p --port <int> SNMP port (default: 161)
-h --help This cruft
--hide-community|-hc Noop option for backwards compatibility

Mode 'status' options:
-w --warn (o|w|c|u) Result if interface is dormant (default=critical)
-D --admin-down (o|w|c|u) Result if interface adminstatus is DOWN (default=OK)

Mode 'errors' options:
-w --warn <float> Errors+Discards/second resulting in warning
--warn-in <float> Same as '--warn', but for inbound traffic only
--warn-out <float> same as '--warn', but for outbound traffic only
-c --crit <float> Errors+Discards/second resulting in critical
--crit-in <float> Same as '--crit', but for inbound traffic only
--crit-out <float> same as '--crit', but for outbound traffic only
-O --only-errors Count only errors and ignore discards
-S --sampling-interval <int> Use two samplings of traffic data instead
of relying on disc-stored data

Mode 'traffic' options:
-w --warn <int or pct> Bits per second OR percent of max capacity
to trigger a warning result
--warn-in <float> Same as '--warn', but for inbound traffic only
--warn-out <float> same as '--warn', but for outbound traffic only
-c --crit <int or pct> Bits per second OR percent of max capacity
to trigger a critical result
--crit-in <float> Same as '--crit', but for inbound traffic only
--crit-out <float> same as '--crit', but for outbound traffic only
-B --perfdatabits Print bps in performance data rather than percent
-N --nagvis-perfdata Print performance data for NagVis weathermap
-b --bps <int> Interface traffic capacity in bits.
Example: "--bps 100m" for a 100mbps interface
-S --sampling-interval <int> Use two samplings of traffic data instead
of relying on disc-stored data

Examples Copied

Check network utilization on a Windows machine Copied

check_traffic traffic -H 192.168.1.100 -d "Ethernet 0" --debug -v 3 -U myUser -L authPriv -a SHA -A myAuthPassword -X myPrivPassword -P AES -w "80m" -c "95m" -b "100m" --perfdatabits

Explanation of the Command Options Copied

Adjusting the Command Copied

Make sure to replace the placeholders (myUser, myAuthPassword, myPrivPassword, 192.168.1.100, Ethernet 0, bandwidth values) with the actual values corresponding to your network environment and security settings. This command will help you monitor the network utilization on a specific interface of a Windows machine, giving you real-time performance insights into your network traffic.

Check network utilization on a Linux machine Copied

check_traffic traffic -H 10.0.0.1 -d "eth0" --debug -v 3 -U myUser -L authPriv -a SHA -A myAuthPassword -X myPrivPassword -P AES -w "80000000" -c "95000000" -b "100000000" --perfdatabits

Explanation of Command Options Copied

Adjustments and Considerations Copied

Example Command for Error Monitoring on Windows Copied

check_traffic errors -H 192.168.1.100 -d "Ethernet 0" -v 3 -U myUser -L authPriv -a SHA -A myAuthPassword -X myPrivPassword -P AES -w 100 -c 300 --warn-in 50 --warn-out 50 --crit-in 150 --crit-out 150 --only-errors

Explanation of Command Options Copied

Adjustments and Considerations Copied

Example Command for Error Monitoring on Linux Copied

check_traffic errors -H 10.0.0.1 -d "eth0" -v 3 -U myUser -L authPriv -a SHA -A myAuthPassword -X myPrivPassword -P AES -w 100 -c 300 --warn-in 50 --warn-out 50 --crit-in 150 --crit-out 150 --only-errors

Explanation of Command Options Copied

Adjustments and Considerations Copied

["Geneos"] ["FAQ"]

Was this topic helpful?