0

I'm on Nagios XI, i used the Vmware .ova to get the install done

I am using the command below to retrieve the actual bandwidth that go through the interfaces of a router

/usr/local/nagios/libexec/check_snmp_int.pl -H x.x.x.x -C community -2 -n eth -f -k -w 1000,1000 -c 1200,1200


eth0:UP (552.9KBps/CRIT 2507.9KBps), eth1:UP (CRIT 2466.9KBps/CRIT 8087.0KBps), eth2:UP (93.0KBps/619.8KBps):(3 UP): CRITICAL | 'eth0_in_octet'=3151058755c 'eth0_out_octet'=2254878312c 'eth1_in_octet'=626765302c 'eth1_out_octet'=634153554c 'eth2_in_octet'=1137408010c 'eth2_out_octet'=160432245c

the command is working.

But the perfdata make the graph annoying to read : eth2_out_octet'=160432245c , etc ...

so i would like to have those values in mb/s

i tried to use the -B -M -Y flags to tweak those values.

I could have the results in bytes or in bits but i could never have them in mb/s

do someone experienced this before and have a solution ?

sebix
  • 4,313
  • 2
  • 29
  • 47
Gorshok
  • 29
  • 11
  • The Manbulon plugins haven't been maintained for a long time: http://nagios.manubulon.com/snmp_int.html – lazyfrosch Aug 09 '17 at 08:13
  • Consider the plugins here: https://github.com/dnsmichi/manubulon-snmp - Please contribute fixes there. – lazyfrosch Aug 09 '17 at 08:15
  • When you are using Nagios XI, you should have support from Nagios Inc. aswell, ask them why the plugins are not maintained ;) – lazyfrosch Aug 09 '17 at 08:15

1 Answers1

0

Alright i ASked on the Nagios XI forum.

What i had to do was modifying the check_snmp_int perl script

and divide the variable by 1024 two times:

$perf_out .= sprintf("%.0f",($checkperf_out_raw[0] * 8)/1024/1024) .";";
$perf_out .= ($o_warn[0]!=0) ? $o_warn[0]*$warn_factor . ";" : ";";
$perf_out .= ($o_crit[0]!=0) ? $o_crit[0]*$warn_factor . ";" : ";";
$perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";
$perf_out .= "'" . $descr[$i] ."_out_Mbps'=";
$perf_out .= sprintf("%.0f",($checkperf_out_raw[1] * 8)/1024/1024) .";";
$perf_out .= ($o_warn[1]!=0) ? $o_warn[1]*$warn_factor . ";" : ";";
$perf_out .= ($o_crit[1]!=0) ? $o_crit[1]*$warn_factor . ";" : ";";
$perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";
Gorshok
  • 29
  • 11