Nagios 3.2.3

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagios 3.2.3

Postby csesso » Fri Jul 22, 2011 1:27 pm

Hi All:

My name is Cesar, I live in Argentina and don’t understand English, so I need your help with a problem with my nagios server.

I have a problem with a script written in Perl. If I run the script from the console with the command:
./check_snmp_mem.pl –H IP –C public –I –w 80% -c 90%

The script it’s work

My problem is when I try to run the script in the nagios Server
Attach my configuration:

Nagios Version: 3.2.3
Operating system: Suse 10

Command.cfg

Code: Select all
# 'check_snmp_mem' command definition TEST SNMP DCORE
define command{
  command_name check_snmp_mem_v1
  command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $USER7$ -I -w $ARG2$ -c $ARG3$ $ARG4$
}


switch.cfg

Code: Select all
# Monitoreo memoria via SNMP

define service {
        use                     generic-service
        host_name               DCore
        service_description     Cisco_mem
        check_command           check_snmp_mem_v1!public!80!90
}


The nagios Server has error

ERROR: Description table : No response from remote host ‘IP SWITCH'.

I apologize if the thread is in the wrong place.

Thanks to all
csesso
 
Posts: 3
Joined: Tue Jul 19, 2011 1:19 pm

Re: Nagios 3.2.3

Postby lmiltchev » Fri Jul 22, 2011 1:42 pm

Try plugging in the full path to your plugin in the Command.cfg:

# 'check_snmp_mem' command definition TEST SNMP DCORE
define command{
command_name check_snmp_mem_v1
command_line /full/path/to/check_snmp_mem.pl $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $USER7$ -I -w $ARG2$ -c $ARG3$ $ARG4$
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12681
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios 3.2.3

Postby csesso » Fri Jul 22, 2011 2:06 pm

lmiltchev wrote:Try plugging in the full path to your plugin in the Command.cfg:

# 'check_snmp_mem' command definition TEST SNMP DCORE
define command{
command_name check_snmp_mem_v1
command_line /full/path/to/check_snmp_mem.pl $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $USER7$ -I -w $ARG2$ -c $ARG3$ $ARG4$
}


Gives the same error

Code: Select all
# 'check_snmp_mem' command definition TEST SNMP DCORE
define command{
  command_name check_snmp_mem_v1
  command_line [b]/full/path/to/check_snmp_mem.pl[/b]   $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ -I -w $ARG2$ -c $ARG3$ $ARG4$
}

(quit -C $USER7$)

The nagios Server has error:

Put snmp login info!

Usage: /opt/nagios/libexec/check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m -b] [-t <timeout>] [-V]
csesso
 
Posts: 3
Joined: Tue Jul 19, 2011 1:19 pm

Re: Nagios 3.2.3

Postby nscott » Fri Jul 22, 2011 3:52 pm

Just to be clear, put in your username and string in place of the $ARG1$ variables, for instance:

/opt/nagios/libexec/check_snmp_mem.pl -H 192.168.5.3 -C public -2 -w 40 -c 50
Nicholas Scott
Former Nagios employee
User avatar
nscott
 
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Nagios 3.2.3

Postby csesso » Sat Jul 23, 2011 7:11 am

nscott wrote:Just to be clear, put in your username and string in place of the $ARG1$ variables, for instance:

/opt/nagios/libexec/check_snmp_mem.pl -H 192.168.5.3 -C public -2 -w 40 -c 50


Yes, It's work.

commands.cfg
Code: Select all
define command{
  command_name check_snmp_mem_v1
  command_line /opt/nagios/libexec/check_snmp_mem.pl -H $HOSTADDRESS$ -C public -I -w 80% -c 90%
}

switch.cfg
Code: Select all
define service {
        use                     generic-service
        host_name               DCore
        service_description     Cisco_mem
        check_command           check_snmp_mem_v1
}

Question:
This the correct way to work with nagios server ?

Thanks again :)
csesso
 
Posts: 3
Joined: Tue Jul 19, 2011 1:19 pm


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 14 guests