On 28 June 2011 15:14,  <radu.p...@technomatic.de> wrote:
> I have tried the SNMP plugin a few minutes ago and here is what I get when
> running it from the command line:
>
> ./check_snmp_int.pl -H 192.168.2.1 -C public -n GigabitEthernet0/24 -k -w
> 200,400 -c 0,600
> GigabitEthernet0/24:UP No usable data on file (1 rows) :(1 UP): UNKNOWN
>
> The interface name I took it from listing all available interfaces on the
> switch.
>
> Any ideas, please?

The plugin stores the metrics in a temporary file the first time you
run it.  It will then use that data the next time you run it to
calculate the metrics.  This error shows either that the file did not
exist yet, or the interval between this time the plugin is run and the
last time is wrong.  You therefore need to run the plugin at regular
intervals (say 5 minutes).  It helps if you use SNMP v2 so you can
retrieve 64-bit counters (the "-2" command line option and the "-g"
option).  And you might also need to use the "-d" option to tell the
plugin at what interval you will usually run it (for example "-d 300"
for 5 minute intervals).  You need the "-f" option to tell the plugin
to output performance data.  I normally specify "-fY" to get the
output in bits/s.

In Nagios you need to set the check_interval and the retry_interval
both to the same 5 minutes (or whatever interval you like so long as
it matches the -d parameter).

Note that if you ran the plugin from the command line as an ordinary
user, it may have created temporary files under /tmp which are not
writeable by Nagios.  When you configure this check to run in Nagios
you may need to delete those temporary files so the nagios user can
write them.

Here is an example of the options I normally use when monitoring
switch interfaces:

-H 198.236.3.4 -C $USER4$ -2 -n "Nortel Ethernet Routing Switch
5510-48T Module - Unit 2 Port 5  " -fY -kqB -g -w
600000,600000,100,100,100000,10 -c 800000,800000,200,200,200000,20 -d
300

Note that $USER4$ is a macro which I specify in the resources.cfg file
which holds the read-only community string.

You'll find there are a couple of default templates for PNP under the
templates.dist directory - check_snmp_int-bits.php and
check_snmp_int.php - you will of course need your check_command
definition to be named appropriately to pick up whichever of those
templates you need.

hth,

Jim

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to