SteScho / manubulon-snmp

Set of Icinga/Nagios plugins to check hosts and hardware with the SNMP protocol.
GNU General Public License v2.0
73 stars 71 forks source link

add metrik for Interface speed K|M|G Bits/s and more comments #90

Closed stargieg closed 6 months ago

SteScho commented 6 months ago

If I interpret line 960 correctly, there are only G, M and K in the units. This means there is no backwards compatibility with the current B. So everyone who previously used bps and updated the check would get undesirable results. This case should be avoided, please correct accordingly.

stargieg commented 6 months ago

The $warn_factor in line 960 is only for the new reported interface speed. I have tested it with and without -B.

SteScho commented 6 months ago

my $warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;

Unfortunately I still don't see it: meg and gig are set, then immediately the default assumption is k. Where is b?

stargieg commented 6 months ago

Don't understand. "-B, --kbits" Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s There is no option for bit. The default is K. The performance output at line 1066 is in bit.

SteScho commented 6 months ago

When I first took a quick look at it, it seemed strange to me. When testing, as you wrote, I couldn't find any significant difference.

Thanks for the pr, it's merged.