You are not logged in.
Hi,
i'd like to monitor an Arch Linux host with Icinga2. Therefore, i installed the "monitoring-plugins" package to get the usual Nagios/Icinga plugins. However, the check_memory plugin throws an error.
$ ./check_memory [09:44:20]
Can't call method "new" on an undefined value at ./check_memory line 55.
The exakt same plugin executes nicely on a Debian Host. The only difference i can spot is that Debian is running Perl 5.24.1 and Arch is running 5.26.1. Since the monitoring-plugins are available in the community repo and not via AUR, i assume the plugins to generally be okay, so that the fault has to be on my side.
I inspected the plugin, and, according to my limited understanding of Perl, this is the problem:
my $plugin_module;
BEGIN {
$plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
}
$PROGNAME = "check_memory";
$VERSION = '1.0.1';
$FREECMD = '/usr/bin/free';
$UNIT = 'M';
my $np = $plugin_module->new(
usage => "Usage: %s [ -w <warning_threshold> ] [ -c <critical_threshold> ]\n"
. ' [ -u <unit> ]',
version => $VERSION,
plugin => $PROGNAME,
blurb => 'Check free(1) data against given tresholds',
timeout => 30,
);
Somehow, it cannot execute "new" on $plugin_module, maybe because the modules listed in load_module aren't available - but shouldn't they be available as a dependency or something?
Offline