Need input on snmp script

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
hokie1999
Posts: 2
Joined: Fri Sep 28, 2012 12:01 pm

Need input on snmp script

Post by hokie1999 »

Hello, this is a noob question.

I need Nagios Core 3.2.3 to monitor drive utilization on 50 Red Hat 5.5 servers via snmp. I have a perl script called "check_snmp_storage.pl" written by Manubulon, that with the configs below gives me
status "Unknown"


command.cfg:

define command{
command_name check_snmp_storage
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS $USER7$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
}



mysite.cfg:

define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name ddcashintmpr
alias localhost
address 162.47.124.x
statusmap_image linux40.gd2
}



define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members ddcashintmpr ; Comma separated list of hosts that belong to this group
}



define service{
use generic-service ; Name of service template to use
host_name ddcashintmpr
service_description disks
check_command check_snmp_storage!/!80!90
}




No warnings on pre-flight check. Maybe a community string issue?

Any help would be appreciated!
hokie1999
Posts: 2
Joined: Fri Sep 28, 2012 12:01 pm

Re: Need input on snmp script

Post by hokie1999 »

As a matter of record to anyone else having this problem, add the "-C communitystring" as the first argument to your services configuration:

define service{
use generic-service ; Name of service template to use
host_name ddcashintmpr,ddcashapp10
service_description disks
check_command check_snmp_storage_v1!-C communitystring!/!80!90!-r

}
Locked