[Nagiosplug-help] check_procs - integer error

Hari Sekhon hpsekhon at googlemail.com
Thu May 1 14:09:08 CEST 2008


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
>
> What am I doing wrong
Not specifically answering your question but it's obvious that you are 
running the Syslog to MySQL logserver. Testing that the syslog2mysql 
script is running is fine... and you may be running it differently to 
me, but mine respawns automatically and instantly if the script dies or 
is terminated for any reason, so testing for the process, at least in my 
case, is completely pointless since there will always be a running process.

Testing the logserver stack top to bottom would probably be better as 
this makes sure everything is working. I wrote a plugin specifically for 
this purpose (one of my favourite plugins), it generates a unique log, 
send it either via tcp or udp and then selects from the mysql db for the 
log message to confirm that the whole stack is working including the 
syslog2mysql bit by implication. It takes a lot of switches so that it 
should work with just about any syslog to mysql implementation and might 
be a good solution for you.

You can get it here:

http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1381.html;d=1

-h

-- 
Hari Sekhon





More information about the Help mailing list