SNMP defines neither package nor VERSION
Posted: Wed Oct 19, 2016 2:09 pm
I am trying to migrate from Core 4 to Nagios XI after migrating from Nagios 3.
The original system has been installed for quite a while, and it uses some plugins that I am migrating over. In particular (but not limited to) the plugin check_snmp_apc_pdu.pl when run gives me an error:
SNMP defines neither package nor VERSION--version check failed at /usr/local/nagios/libexec/check_snmp_apc_pdu.pl line 7.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_snmp_apc_pdu.pl line 7.
The beginning of that plugin is shown here:
I am new to perl and still wet behind the ears with Linux.
Can anyone explain why I am getting this error, and more importantly how to fix it?
Thanks in Advance
The original system has been installed for quite a while, and it uses some plugins that I am migrating over. In particular (but not limited to) the plugin check_snmp_apc_pdu.pl when run gives me an error:
SNMP defines neither package nor VERSION--version check failed at /usr/local/nagios/libexec/check_snmp_apc_pdu.pl line 7.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_snmp_apc_pdu.pl line 7.
The beginning of that plugin is shown here:
Code: Select all
#!/usr/bin/perl
use strict;
require 5.6.0;
use lib qw( /opt/nagios/libexec );
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage);
use SNMP 5.0;
use Getopt::Long;
use vars qw( $exit $message $opt_host $opt_help $opt_community $opt_phases $opt_phase_1 $opt_phase_3 $opt_status_A $opt_status_B $opt_status_C $opt_return_ok $opt_return_warn $opt_return_crit $PROGNAME $TIMEOUT );
$PROGNAME = "check_snmp_liebert_alarms.pl";
$opt_host = undef;
$opt_community = 'public';
$message = undef;
$exit = 'UNKNOWN';
$opt_return_ok = 'phaseLoadNormal';
$opt_return_warn = 'phaseLoadNearOverload';
$opt_return_crit = 'phaseLoadOverload';
$opt_phases = undef;
$opt_phase_1 = 'INTEGER: 1';
$opt_phase_3 = 'INTEGER: 3';
$opt_status_A = undef;
Can anyone explain why I am getting this error, and more importantly how to fix it?
Thanks in Advance