From 0a36fe30f12a988bf061d287b9890652e78f8277 Mon Sep 17 00:00:00 2001 From: Romain THERRAT Date: Mon, 31 Mar 2014 12:36:41 +0200 Subject: [PATCH 1/2] Use -Y instead of -y for network usage check The -Y args return the bandwidth in bit per second. The -y args return the bandwidth in percent. With a linux box we mainly want to know the bandwidth in bps in order to calculate something like 95th percentile. --- pack/commands.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack/commands.cfg b/pack/commands.cfg index d49ea38..911db60 100644 --- a/pack/commands.cfg +++ b/pack/commands.cfg @@ -22,7 +22,7 @@ define command { define command { command_name check_linux_network_usage - command_line $PLUGINSDIR$/check_netint.pl -H $HOSTADDRESS$ -C $_HOSTSNMPCOMMUNITY$ -n "$_HOSTNET_IFACES$" -f -e -w $_HOSTNET_WARN$ -c $_HOSTNET_CRIT$ -q -k -y -M -B -m -P "$SERVICEPERFDATA$" -T "$LASTSERVICECHECK$" -o $_HOSTSNMP_MSG_MAX_SIZE$ + command_line $PLUGINSDIR$/check_netint.pl -H $HOSTADDRESS$ -C $_HOSTSNMPCOMMUNITY$ -n "$_HOSTNET_IFACES$" -f -e -w $_HOSTNET_WARN$ -c $_HOSTNET_CRIT$ -q -k -Y -M -B -m -P "$SERVICEPERFDATA$" -T "$LASTSERVICECHECK$" -o $_HOSTSNMP_MSG_MAX_SIZE$ } define command { From 517ee8f4ccd20acd0ef23ac9bdd5978d91eb809d Mon Sep 17 00:00:00 2001 From: Romain THERRAT Date: Mon, 31 Mar 2014 12:40:21 +0200 Subject: [PATCH 2/2] Add network usage graphite graph This template show the eth0 interface with the 95th percentil. --- share/templates/graphite/check_linux_network_usage.graph | 1 + 1 file changed, 1 insertion(+) create mode 100644 share/templates/graphite/check_linux_network_usage.graph diff --git a/share/templates/graphite/check_linux_network_usage.graph b/share/templates/graphite/check_linux_network_usage.graph new file mode 100644 index 0000000..21f1714 --- /dev/null +++ b/share/templates/graphite/check_linux_network_usage.graph @@ -0,0 +1 @@ +${uri}render/?width=586&height=308&lineMode=connected&vtitle=Network%20Usage%20(bps)&fgcolor=000000&bgcolor=FFFFFF)&yMin=0&target=legendValue(alias(nPercentile(${host}.${service}.eth0_out_bps%2C95)%2C%22Eth0 out 95th prct%22)%2C%22last%22)&target=legendValue(alias(${host}.${service}.eth0_out_bps%2C%22Eth0 outgoing bandwidth%22)%2C%22last%22)&target=legendValue(alias(nPercentile(${host}.${service}.eth0_in_bps%2C95)%2C%22Eth0 in 95th prct%22)%2C%22last%22)&target=legendValue(alias(${host}.${service}.eth0_in_bps%2C%22Eth0 in bandwidth%22)%2C%22last%22)