[Nagiosplug-help] check_procs - integer error

Thomas Guyot-Sionnest dermoth at aei.ca
Thu May 1 10:17:18 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/04/08 11:09 PM, secrookie at gmail.com wrote:
> I have 2 checks defined, they run but the status info is showing that
> it must be an integer:
> 
> define service{
>         use                             local-service         ; Name
> of service template to use
>         host_name                       localhost
>         service_description             syslog2mysql
>         check_command
> check_local_procs!-w!1!-a!syslog2mysql.sh!-u!root
>         notifications_enabled           0
>         }
> 
> define service{
>         use                             local-service         ; Name
> of service template to use
>         host_name                       localhost
>         service_description             nagios
>         check_command
> check_nagios!-e!5!-F!/usr/local/nagios/var/status.dat!-C!/usr/local/nagios/bin/nagios
>         notifications_enabled           0
>         }
> 
> The checks run find via command line:
> 
> PROCS OK: 1 process with args 'syslog2mysql.sh', UID = 0 (root)
> NAGIOS OK: 1 process, status log updated 6 seconds ago

The arguments you put in the service definition between bangs (!) are
not sent directly to the plugin. They are rather being expanded to
$ARGn$ macros (starting at $ARG1$) in the command definition. The
command definition can have use other macros instead of passing
arguments, like $HOSTADDRESS$ for network-based checks.

Example (from Nagios doc) of a command that will require no argument
from the service definition:

define command{
  command_name  check_pop
  command_line  /usr/local/nagios/libexec/check_pop -H $HOSTADDRESS$	
  }

Here's a list of macros for Nagios 2 (a similar list exists for Nagios 3
if you use it):
http://nagios.sourceforge.net/docs/2_0/macros.html

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIGXyO6dZ+Kt5BchYRAkRkAKCrS1a2TGOzt4EydCXUpCo3TN6RIwCfazLT
zUu8AvZ4SjTNTqL9sJcqtzg=
=2JWm
-----END PGP SIGNATURE-----




More information about the Help mailing list