This site :
Home
Nagios plugins
Info on snmp
Nagios config
FAQ
Project page on SourceForge
-----------
Links :
Nagios Home
Nagios Plugins
Oreon project
NagiosExchange
Opsyx forum
Forum 2037
-----------
Others :
-----------
SourceForge.net Logo
FAQ

 

Last update : May 25 2007

 

FIRST, look at the web page associated with every script.

Running the scripts :

- The scripts outputs "Can't locate Net/SNMP.pm in @INC....."

- How do I install Net::SNMP perl module

- What are the supported platforms to run the scripts on ?

- How do I get help on the options ?

- Return code of X is out of bounds

- Are these plugins compatible with Nagios 2.0 ?

- ERROR: XXXXXX : Expected OBJECT IDENTIFIER in dotted notation.

- "No Output" using Nagios 2

- Getting : "ERROR: Size table :Message size exceeded buffer maxMsgSize"

- No usable data on file (X rows)

Misc

- Are these scripts secure ?

- How can I get help ? Is there a mailling list ? a forum ?

- Can I donate to help this project ?


The scripts outputs "Can't locate Net/SNMP.pm in @INC....."

You don't have Net::SNMP installed, see below

How do I install Net::SNMP perl module ?

There are 2 ways of doing this

1) By CPAN (best)

on command line, as root :

[your_host]# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled
cpan> install Net::SNMP

If it's the first time you run CPAN, it will probably ask you some (simple) questions.

CPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..).

2) "By hand"

Get the folowings modules (tar.gz format) on www.cpan.org

- Crypt::DES
- Digest::MD5
- Digest::SHA1
- Digest::HMAC
- Net::SNMP

for each one (you must install Net::SNMP at the end) :
tar zxf <module>.tar.gz
cd <module>
perl Makefile.pl
make test
make install

What are the supported platforms to run the scripts on ?

Most Linux, maybe some unixes and maybe Cygwin.
Actually anything you can run perl on.
If you can install the latest Net::SNMP module, then the perl version should be OK.

How do I get help on the options ?

Just run <script> -h on the command line.

Return code of X is out of bounds

Have a look at : http://www.nagios.org/faqs/viewfaq.php?faq_id=17

In case of return code 127, try putting perl in the command line definition :

define command{
command_name check_disk
command_line /usr/bin/perl $USER1$/check_snmp_storage.pl -C $ARG1$ [........]
}

Are these plugins compatible with Nagios 2.0 ?

Yes.

ERROR: XXXXXX : Expected OBJECT IDENTIFIER in dotted notation.

Upgrade your Net::SNMP module version (5 is good, 4 maybe OK, 3 gives this error)
This happens with Debian Woody (Net::SNMP version 3.6).
I have special patches if you can't upgrade : contact me.

"No Output" using Nagios 2

It's a "bug" of embeded perl. It has been corrected in latest Nagios releases.

You can :

- Add a patch if your nagios release is old. Here is a patch made by Gavin Carr for the p1.pl file to correct this (it should be in nagios CVS shortly). http://nagios.manubulon.com/p1-print.pl.patch

- Upgrade Nagios.

- add "/usr/bin/perl" before the script command so Nagios won't use embeded perl.

Getting : "ERROR: Size table :Message size exceeded buffer maxMsgSize"

Your snmp table is too big.

Some of my scripts (check_snmp_storage and check_snmp_process) now have an option (-o) to set this directly on command line (thx to Makina Corpus for the patch).

In other scripts, try adding :

$session->max_msg_size(5000);

After the session has been initialized.

No usable data on file (X rows)

Scripts like check_snmp_int need to store data when they get a SNMP counter so they can outpout readable data like bandwidth, cpu, etc....

For example, to output a bandwidth with an octet counter, check_snmp_int will store data every time it is run. It will also read the previous data, and try to get data old enough to make a correct average. By default, it needs data which was produced 5 minutes ago.

So, when you first run the script - or if you run it a long time ago -, it won't be able to get data old enough and will report an error (UNKNOWN status) saying the is "no usable data on file (X rows)".
If you leave the 5 minutes default delta value, the script will need data wich is :
- At least 4 minutes and 30 seconds old (5 min - 10%)
- At most 15 minutes old (3 * 5 min)

You can change this 5 minutes value using the '-d <sec>' option. The script will then look for data which is at least <sec>-10% old and at most 3*<sec>.

This option will only tell to make an average on <sec> seconds, you can run the service every minute with Nagios, it will always get the newest value which is at least <sec>-10% old.
The only thing you must check is that your service will at least run every 15 minutes, or the script will always output "unknown" as the value will be too old for him.


Are these scripts secure ?

Not at all ! You must secure the Nagios server.
Nobody else than the nagios user should be allowed to even think about running these scripts.

How can I get help ? Is there a mailling list ? a forum ?

Go to the sourceforge project page for all this : Nagios-snmp

Can I donate to help this project ?

Of course you can, I just haven't got any idea of how, so just send a postcard to my son (Jolan) with a nice drawing (or buy a cookie to your son/daughter/nephew/grand-ma...).
You can get my postal address on my resume (www.manubulon.com/cvpproy.htm).
He will answer you when he knows how to write (in several years).

This project is also hosted by :
SourceForge.net Logo