Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error from plugin on server since the upgrade to Pandora 5.1 SP1
#1
I am getting the following error from the server log for two plug-ins that worked fine until my upgrade to 5.1 SP1.

[ERROR] Undefined value returned by plug-in module X agent Y. Is the server out of memory?

I have confirmed permissions for the folder and files for apache, checked for timeouts,  and tested that the scripts run from terminal and return one value.  Any other ideas?

Both plugins are Perl scripts and the code for one of the scripts is below. It is a simple script that combines in and out octets for total network usage. And again, it works from the terminal command line.

Code:
#!/usr/bin/perl -w

use strict;
use warnings;

sub get_param($) {
        my $param = shift;
        my $value = undef;

        $param = "-".$param;

        for(my $i=0; $i<$#ARGV; $i++) {

                if ($ARGV[$i] eq $param) {
                        $value = $ARGV[$i+1];
                        last;
                }

        }
        return $value;
}

sub usage () {
        print "iface_bandwith.pl version v1r1\n";
        print "\nusage: $0 -ip <device_ip> -com <community> -if <iface_name>\n";
        print "\nIMPORTANT: This plugin uses SNMP v1\n\n";
}

#Global variables
my $ip = get_param("ip");
my $community = get_param("com");
my $ifname = get_param("if");

if (!defined($ip) ||
        !defined($community) ||
        !defined($ifname) ) {
        usage();
        exit;
}

#Browse interface name
my $res = `snmpwalk -L n -c $community -v1 $ip .1.3.6.1.2.1.2.2.1.2 -On`;

my $suffix = undef;

my @iface_list = split(/\n/, $res);

foreach my $line (@iface_list) {

        #Parse snmpwalk line
        if ($line =~ m/^([\d|\.]+) = STRING: (.*)$/) {
                my $aux = $1;

                #Chec if this is the interface requested
                #if ($2 eq $ifname) {
                # Changed to ifname substring of inteface desc for changing ifsuffix on CP.
                if (index($2, $ifname) != -1) {

                        my @suffix_array = split(/\./, $aux);

                        #Get last number of OID
                        $suffix = $suffix_array[$#suffix_array];
                }
        }
}

#Check if iface name was found
if (defined($suffix)) {
        #Get octets stats
        my $inoctets = `snmpget -L n $ip -c $community -v1 .1.3.6.1.2.1.2.2.1.10.$suffix -OUevqt`;
        my $outoctets = `snmpget -L n $ip -c $community -v1 .1.3.6.1.2.1.2.2.1.16.$suffix -OUevqt`;

        print $inoctets+$outoctets;
}
 Reply
#2
hello,

Since version 5.1 has changed the way we run plugins. So, being a server plugin, try deleting and register it again.

Can you attach a plugin settings screenshot?

Regards
 Reply
#3
I cannot delete and register the plug-ins since they are in use as monitors on several agents and I do not have time to rework the system because of changes where the impact to the user is not considered.

I am attaching screen shots below. The first two plug-ins (Get Network Usage Data and Dell Warranty Check),  do not work and the last one (Net Device Data from ECM) does work. As indicated previously, all the plug-ins worked prior to the upgrade.

Thank You,

Chuck Andrews



Attached Files


.png   5599438141652992-1.png (Size: 118.22 KB / Downloads: 100)
.png   6096627985022976-2.png (Size: 78.34 KB / Downloads: 99)
.png   5410657618886656-3.png (Size: 113.93 KB / Downloads: 106)
 Reply
#4
hello,

in _field1_ have to add macros, for example _address_. In plug-parameters is fine, but in "Description" you have to put macros.

Regards
 Reply
#5
This issue is still open. I have tried removing one of the plug-ins and re-adding and the results are the same. I am frustrated that all of these plugins worked for years and the update appears to have rendered them useless. Please advise.
 Reply
#6
I think the problem may be that there was a version of that script added to the product.  I noticed an iface_bandwidth.pl in the /usr/share/pandora_server/util/plugin directory.  You might try renaming it to see if the problems go away.  If so I'd recommend renaming your plugin and adjusting the module so that you don't get burned on the next upgrade.
 Reply
#7
(06-09-2015, 06:47 PM)rbnelson link Wrote: I think the problem may be that there was a version of that script added to the product.  I noticed an iface_bandwidth.pl in the /usr/share/pandora_server/util/plugin directory.  You might try renaming it to see if the problems go away.  If so I'd recommend renaming your plugin and adjusting the module so that you don't get burned on the next upgrade.


Thanks for the suggestion but I'm not sure I follow. None of my plug in scripts use that name currently nor do they call that script. Am I missing something?

Thanks again!
 Reply
#8
That was the name in the script you posted.

Anyways, if you go to Manage servers, then Manage plug-ins, do you see your plugin listed?  If so click on the wrench icon to edit it.

Does it have the right path to the script?

Do the plugin parameters look right?  In the example you posted it should be something like:

-ip _field1_ -com _field2_ -if _field3_

Now go to the screen to edit the module that isn't working.

Make sure the plugin selected is the right one.

Make sure there are the three fields shown below the plugin name and that they have the correct values.

Hope that helps.
 Reply


Users browsing this thread: 2 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes