From 40a1685c14870a7e18a96146e1c78bbc4b1e1353 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 21 Aug 2023 16:39:47 +0200 Subject: [PATCH] add netio doc page --- docs/20_Checks/_index.md | 2 +- docs/20_Checks/check_netio.md | 83 +++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 docs/20_Checks/check_netio.md diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md index 547b3ac..335c6c6 100644 --- a/docs/20_Checks/_index.md +++ b/docs/20_Checks/_index.md @@ -26,7 +26,7 @@ There is one include script used by all checks: * [check_haproxy_status](check_haproxy_status.md) * [check_memory](check_memory.md) * [check_mysqlserver](check_mysqlserver.md) -* check_netio +* [check_netio](check_netio.md) * [check_netstat](check_netstat.md) * [check_onehost](check_onehost.md) * [check_onevm](check_onevm.md) diff --git a/docs/20_Checks/check_netio.md b/docs/20_Checks/check_netio.md new file mode 100644 index 0000000..fc1826e --- /dev/null +++ b/docs/20_Checks/check_netio.md @@ -0,0 +1,83 @@ +# check_netio + +## Introduction + +Show network io for all or selected interfaces. + +This plugin scans `/proc/net/dev` with the regex `eth|en[ops][0-9]*` to show a few types of interfaces. + +### Requirements + +* none + +## Syntax + +```text +> ./check_netio -h +______________________________________________________________________ + +CHECK_NETIO +v1.1 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 + +https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_netio.html +______________________________________________________________________ + +Show network io for all or selected interfaces. +It shows the current counter value from /proc/net/dev and the speed +in byte per sec since last execution. + +This plugin sends performancedata. + +SYNTAX: + check_netio [-h] [-i INTERFACE(S)] + +OPTIONS: + -h this help + +PARAMETERS: + -i INTERFACE show this interface only. Quote multiple interfaces. + The check returns unknown if an interface does not + exist. + +EXAMPLES: + + check_netio show netio of all network interfaces + check_netio -i "eth0 eth1" + show netio of given interfaces. + +``` + +## Examples + +### Host with single interface + +A simple call on a host with a single interface... `check_netio` returns + +```txt +OK: Network IO ... IN 0 MB/s >> [host] >> 0 MB/s OUT + +--- enp0s31f6: + receive: 1079156830 28849 byte/s + transmit: 1082596810 2898 byte/s + + |rx=28849;; tx=2898;; + ``` + +### Custom interface + +You get the same output with `check_netio -i enp0s31f6`. + +If you enter a wrong interface the check returns with "UNKNOWN". +`check_netio -i "whatever"`returns + +```txt +UNKNOWN: Network IO ... IN 0 MB/s >> [host] >> 0 MB/s OUT + +--- whatever: +UNKNOWN: the interface whatever does not exist. + + |rx=0;; tx=0;; + ``` -- GitLab