Hello

 

 

It seems that I have more parking problems with Opsview.

This time with Perl script.

 

To put it simply:

 

use SNMP;

$session = new SNMP::Session(DestHost => $ARGV[0],

                              Community => $ARGV[1],

                              Version => $ARGV[2],

                              UseEnums => 1,

                              UseSprintValue => 1

                              );

#die "Cannot create SNMP::Session (",$SNMP::Session::ErrorStr,")\n" if ( !
defined($session));

$oids = new SNMP::VarList([$oid_temp1],[$oid_temp2]);

($numofclients,$AP_Name)= $session->get($oids);

#die $session->{ErrorStr} if ($session->{ErrorStr});

 

It works great on the console (run by Nagios user) but when it is run by
Opsview - both $numofclients and $AP_Name variables are empty

When I uncomment the die statements I get 'Error 255 is out of bounds'.

 

Same goes for :

 

# use SNMP;  commented out

$numofclients = `snmpget -v 2c -c $community -Ovq $hostname $oid1`;

$AP_Name = `snmpget -v 2c -c $community -Ovq $hostname $oid2`;

 

I use Ubuntu 8.04 LTS.

 

How can I fix this?

How can I debug what Opsview is actually doing with my script?

 

Anyone can help?

 

------------------------------------

 

Regards

 

Michal Zyzak

Administrator  img_CCNA_1

+48 71 3761 689

+48 665 351 639

 

TIM S.A.

ul. E. Kwiatkowskiego 24

55-011 Siechnice

Poland

 

----------------------------------------------------------------------------
--------

This email and any attachments are intended only for the named recipient and
may 

contain confidential and/or privileged material.

Any unauthorized copying, dissemination or other use by a person other than 

the named recipient of this communication is prohibited.

If you received this in error or are not named as a recipient, please notify
the sender 

and destroy all copies of this email immediately.

----------------------------------------------------------------------------
--------

 

<<image002.jpg>>

_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to