SNMP/Windows disk usage

mark.potter at academy.com mark.potter at academy.com
Wed Feb 20 15:50:54 CET 2008


Melanie.

1. When you test the script are you testing it as the nagios user?
2. Does the script reside in the libexec folder under the nagios user's 
home directory?

If the answer to the above questions is yes then:

define  command {
        command_name    check_snmp_windows_disk
        command_line    $USER1$/check_snmp_storage -H $HOSTADDRESS$ -C 
$ARG1$ -q FixedDisk -w $ARG2$ -c $ARG3$ -m $ARG4$ $ARG5$
        }
That is my command definition. $ARG5$ is an optional switch for exclusion.

One of the check commands (with security info snipped)

define  service {
        host_name                          <SNIP>
        service_description             SNMP - Windows - Disk - Production
        is_volatile                           0
        check_command check_snmp_windows_disk!<SNIP>!95!98!^C:!-e
        max_check_attempts          3
        normal_check_interval        120
        retry_check_interval            30
        active_checks_enabled        1
        passive_checks_enabled     1
        check_period                    24x7
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  sysalertstest
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        notifications_enabled           1
        register                        1
        }

That is the check for our production windows servers excluding the C drive 
(the -e is the exclude switch).

I hope this information is helpful.

Melanie Pfefer <melanie_pfefer at yahoo.co.uk> wrote on 02/20/2008 07:00:30 
AM:

> Hello again
> 
> I downloaded the perl script and indeed I can use it
> manually:
> ./check_snmp_storage.pl -H TROY -C public -m ^[CDE]:
> -w 80% -c 90%
> 
> D:\ Label:  Serial Number 225e3590:
> 3%used(2587MB/89495MB) C:\ Label:  Serial Number
> 8cfa6a13: 27%used(6644MB/25000MB) (<80%) : OK
> 
> 
> 
> In nagios, I should define a service and a command to
> start using check_snmp_storage.pl. Could you please
> help in what I should add?
> 
> Many thanks
> 
> 
> --- mark.potter at academy.com wrote:
> 
> > You will need to actually download the plugin from 
> > http://nagios.manubulon.com/snmp_storage.html as it
> > is not part of the 
> > Nagios plugins package but rather a third party
> > plugin.
> > 
> > Melanie Pfefer <melanie_pfefer at yahoo.co.uk> wrote on
> > 02/19/2008 03:37:04 
> > PM:
> > 
> > > Hello
> > > 
> > > I added this:
> > > 
> > > define command{
> > >         command_name    check_win_storage
> > >         command_line 
> > $USER3$/check_snmp_storage.pl
> > > -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -w $ARG3$ -c
> > > $ARG4$
> > > }
> > > 
> > > 
> > > define service {
> > >         use                     common-service
> > >         hostgroup_name          nt-servers
> > >         service_description     Check Windows
> > drives
> > >         check_command 
> > > check_win_storage!public!^[CDE]:!80!90!
> > > }
> > > 
> > > the result was: Return code of 127 is out of
> > bounds -
> > > plugin may be missing
> > > 
> > > 
> > > Any idea?
> > > thanks
> > > --- mark.potter at academy.com wrote:
> > > 
> > > > Melanie,
> > > > 
> > > > I have setup the plugin available here: 
> > > > http://nagios.manubulon.com/snmp_storage.html
> > and it
> > > > works perfectly for 
> > > > our needs. It uses SNMP so you would have to
> > have
> > > > SNMP setup on all of 
> > > > your Windows boxes but with that caveat it is
> > the
> > > > best solution I have 
> > > > found for monitoring windows partitions. If you
> > are
> > > > looking for something 
> > > > slightly less complicated or with fewer options
> > > > there are many plugins on 
> > > > nagiosexchange.com that will do the job. I would
> > > > recommend 
> > > > check_snmp_storage though due to the options and
> > the
> > > > robustness of the 
> > > > plugin.
> > > > 
> > > > Best Regards,
> > > > 
> > > > Mark L. Potter
> > > > Systems Engineer
> > > > Academy Sports & Outdoors
> > > > 1800 N. Mason Rd
> > > > Katy, Texas 77449
> > > > 
> > > > 
> > > > 
> > > > Melanie Pfefer <melanie_pfefer at yahoo.co.uk>
> > wrote on
> > > > 02/19/2008 03:04:23 
> > > > AM:
> > > > 
> > > > > Hello Mark,
> > > > > I am interested in monitoring the disks even
> > with
> > > > no
> > > > > exclusions.
> > > > > I installed nagios2.9 and the nagios plugin on
> > a
> > > > linux
> > > > > box.
> > > > > 
> > > > > Would it be possible that you give me what
> > you?ve
> > > > done
> > > > > to monitor the partitions on windows?
> > > > > 
> > > > > I appreciate your help.
> > > > > 
> > > > > --- mark.potter at academy.com wrote:
> > > > > 
> > > > > > nagios-users-bounces at lists.sourceforge.net
> > wrote
> > > > on
> > > > > > 02/18/2008 11:22:05 
> > > > > > AM:
> > > > > > 
> > > > > > > mark.potter at academy.com schrieb:
> > > > > > > > We are using snmp to monitor our windows
> > > > servers
> > > > > > and I have had a 
> > > > > > request 
> > > > > > > > from the windows admins. They want to
> > alert
> > > > at
> > > > > > 80% and 90% usage on 
> > > > > > C:\ 
> > > > > > > > but 95% and 98% on all other partitions.
> > (I
> > > > > > didn't ask about the logic 
> > > > > > 
> > > > > > > > because it wouldn't matter). I have
> > tried
> > > > > > multiple snmp plugins and 
> > > > > > all of 
> > > > > > > > them seem to act the same. I can monitor
> > all
> > > > the
> > > > > > disks on a single 
> > > > > > check, 
> > > > > > > > a single disk on a single check but I
> > cannot
> > > > > > monitor all the disks 
> > > > > > except 
> > > > > > > > C: on a single check. There doesn't seem
> > to
> > > > be
> > > > > > any plugins out there 
> > > > > > that 
> > > > > > > > allow exclusion and use snmp. Before I
> > go
> > > > > > writing a wrapper for an 
> > > > > > > > existing plugin does anyone know if
> > there is
> > > > a
> > > > > > plugin that will allow 
> > > > > > me 
> > > > > > > > to do this? I am looking to exclude a
> > single
> > > > > > drive letter but check 
> > > > > > all 
> > > > > > > > the rest of the drives via snmp on
> > windows
> > > > > > servers. Thanks in advance 
> > > > > > for 
> > > > > > > > any advice.
> > > > > > > > 
> > > > > > > 
> > > > > > >
> > http://nagios.manubulon.com/snmp_storage.html
> > > > > > > 
> > > > > > > 
> > > > > > > check_snmp_storage will do the Job
> > > > > > > 
> > > > > > > Joerg
> > > > > > That does exactly what we need. Is it listed
> > on
> > > > > > Nagios Exchange? Thank you 
> > > > > > for your response; I have managed to escape
> > > > writing
> > > > > > a wrapper thanks to 
> > > > > > you!
> > > > > > >
> > > > > 
> > > >
> > > 
> >
> 
-------------------------------------------------------------------------
> > > > > > This SF.net email is sponsored by: Microsoft
> > > > > > Defy all challenges. Microsoft(R) Visual
> > Studio
> > > > > > 2008.
> > > > > >
> > > > >
> > > >
> > >
> >
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/>
> > > > >
> > _______________________________________________
> > > > > > Nagios-users mailing list
> > > > > > Nagios-users at 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
> > > > > 
> > 
> === message truncated ===
> 
> 
> 
>       __________________________________________________________
> Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080220/bc961903/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list