Hello,
I've just migrated from Zabbix 1.8.2 to 2.2.2 with an installation from scratch.
I've succeeded except for a specific external script I used to check MIB on the network devices, here it is :
It perfectly worked on 1.8.2 but does not work on 2.2.2 anymore.
It's on chmod 777 on my zabbix proxy.
The key is like that : checkmib.pl[public .x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x]
When I launch the command ./checkmib @ip public .x.x.x.x.x.x.x.x.x.x.x.x.x.x] in a terminal it returns 1 (what I want) but zabbix using it constantly returns 0
As a way to solve, I have a problem with my controller (a remote machine for wich I make a constant ping using "icmpping" as key, and wich fail despite the fact that I can ping it perfectly from a terminal)
I've just migrated from Zabbix 1.8.2 to 2.2.2 with an installation from scratch.
I've succeeded except for a specific external script I used to check MIB on the network devices, here it is :
Code:
#!/usr/bin/perl
use strict;
use warnings;
use SNMP;
# requires a hostname and a community string as its arguments
my $session = new SNMP::Session(DestHost => $ARGV[0], Community => $ARGV[1],UseSprintValue => 1, Version => 2 );
if(!defined $session){
print "0";
exit 0;
}
my $request="$ARGV[2]";
my $result = $session->get($request);
if ($session->{ErrorStr}){
print "0";
}
else{
my $val = substr $result, 0, 1;
if ($val eq "0") {
$val=1;
} else {
$val = do { no warnings; int($result); };
if ($val>0) {$val=1;}
}
print $val;
# print $result
}
exit 0;
It's on chmod 777 on my zabbix proxy.
The key is like that : checkmib.pl[public .x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x]
When I launch the command ./checkmib @ip public .x.x.x.x.x.x.x.x.x.x.x.x.x.x] in a terminal it returns 1 (what I want) but zabbix using it constantly returns 0
As a way to solve, I have a problem with my controller (a remote machine for wich I make a constant ping using "icmpping" as key, and wich fail despite the fact that I can ping it perfectly from a terminal)
Comment