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

Installation requires perl-bignum on Fedora (likely CentOS/Redhat) for bigint package #64

Open adamparker opened 5 years ago

adamparker commented 5 years ago

bigint was moved into a new package perl-bignum.

Related here: https://bugzilla.redhat.com/show_bug.cgi?id=1286363

[root@nms plugins]# ./check_snmp_int.pl Can't locate bigint.pm in @INC (you may need to install the bigint module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./check_snmp_int.pl line 412. BEGIN failed--compilation aborted at ./check_snmp_int.pl line 412.

[root@nms plugins]# dnf install perl-Math-BigInt Last metadata expiration check: 0:06:17 ago on Mon 03 Jun 2019 18:07:27 BST. Package perl-Math-BigInt-1:1.9998.13-3.fc29.noarch is already installed. Dependencies resolved. Nothing to do. Complete!

dnf install perl-bignum

[root@nms plugins]# ./check_snmp_int.pl Usage: ./check_snmp_int.pl [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,) [-p ] -n [-N -A -i -a -D --down] [-r] [-f[eSyY]] [-k[qBMGu] -g -w -c -d] [-o ] [-t ] [-s] --label [-V] [root@nms plugins]#

adamparker commented 5 years ago

This was with Fedora 29.

dnsmichi commented 5 years ago

Are you sure that all dependencies are installed? I just tried it with a fresh Docker container for Fedora 29, this works like a charm.

$ docker run -ti -v `pwd`:/mnt fedora:29 bash

[root@d91a6f0e0247 mnt]# dnf -y install perl perl-Net-SNMP perl-Getopt-Long perl-Crypt-DES perl-Crypt-Rijndael perl-Digest-HMAC

[root@d91a6f0e0247 mnt]# plugins/check_snmp_int.pl
Usage: plugins/check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>)  [-p <port>] -n <name in desc_oid> [-N -A -i -a -D --down] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
robpou commented 4 years ago

I'm not sure about Fedora but on RHEL/CentOS8 I saw the same error message as @adamparker. I tried these packages:

perl-Math-BigInt # (was installed by default) perl-Math-BigInt-GMP perl-Math-BigInt-FastCalc

but they didn't contain the needed bigint.pm. After installing perl-bigint the plugin started working.