riskersen / Monitoring

Monitoring plugins wich are Nagios/icinga compatible
65 stars 113 forks source link

check_fortigate snmp v3 support ? #3

Closed LeDistordu closed 9 years ago

LeDistordu commented 9 years ago

Hi, thank you for your plugin ;) SNMP v3 support is planned ?

riskersen commented 9 years ago

Hey,

i already developed this :-) Please check my latest commit: 193d7b510c13c3b02902f6b313785c56ed0fa8f1

Greetings Oliver

LeDistordu commented 9 years ago

Great ^^

I have a problem with plugin :

./check_fortigate.pl: bad interpreter: /usr/bin/perl^M: no such file or directory

after "#! /usr/bin/perl -w"

It's ok but if i

./check_fortigate.pl --help [12:08:33] Scalar value @help_serials[$#help_serials] better written as $help_serials[$#help_serials] at ./check_fortigate.pl line 265. POD ERRORS Hey! The above document had some coding errors, which are explained below:

Around line 463:
    '=item' outside of any '=over'
riskersen commented 9 years ago

Hey, thanks for your feedback!

I've updated POD and fixed the help_serials scalar.

LeDistordu commented 9 years ago

N problem for feedback ;) Thanks are for you :)

./check_fortigate.pl --help = no response

./check_fortigate.pl -H x.x.x.x -T cpu -v 3 -U user -A pass -a md5 Argument "" isn't numeric in numeric ne (!=) at ./check_fortigate.pl line 80. Argument "Support unavailable for privProtocol [aes] (Required mod..." isn't numeric in numeric ne (!=) at ./check_fortigate.pl line 80. Can't call method "get_request" on an undefined value at ./check_fortigate.pl line 370.

riskersen commented 9 years ago

Which perl version do you use? You're also missing -X privpassword :)

LeDistordu commented 9 years ago

Centos 6 perl v5.10.1

./check_fortigate.pl -H x.x.x.x -T cpu -v 3 -U user -A pass -a md5 -X pass [15:03:53] Argument "" isn't numeric in numeric ne (!=) at ./check_fortigate.pl line 80. Argument "Support unavailable for privProtocol [aes] (Required mod..." isn't numeric in numeric ne (!=) at ./check_fortigate.pl line 80. Can't call method "get_request" on an undefined value at ./check_fortigate.pl line 370.

riskersen commented 9 years ago

Okay..I see whats happening, theres an error at your snmp session creation and my error comparision was not coded correctly (which is fixed by latest commit).

Basically your perl installation is missing a required module (assumption Crypt::Rjiendael), if you update the plugin to latest commit, you should see a correct error message.

LeDistordu commented 9 years ago

after

sudo yum install perl-Crypt-Rijndael

./check_fortigate.pl --help << No response

But

./check_fortigate.pl -H x.x.x.x -T cpu -v 3 -U user -A pass -a md5 -X pass -x aes

Argument "90%" isn't numeric in numeric ge (>=) at ./check_fortigate.pl line 193. Argument "80%" isn't numeric in numeric ge (>=) at ./check_fortigate.pl line 196. OK: HIDE (Master: HIDE) CPU is okay: 21%|'cpu'=21%;80;90

riskersen commented 9 years ago

I'm now striping any non digits before and after digits :-)

LeDistordu commented 9 years ago

I still have the same problem :(

Argument "90%" isn't numeric in numeric ge (>=) at ./check_fortigate.pl line 196. Argument "80%" isn't numeric in numeric ge (>=) at ./check_fortigate.pl line 199.

riskersen commented 9 years ago

Pfff.. ;-)

I've installed a Server with a similar perl version:

perl -v

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

So i the next few days ill test this with this perl version, this perl version seem to be distributed in many Redhat 6 based distributions.

EDIT: as this did not leave me in peace, i should've fixed your issue by now..