how to get passive checks to work
Wojciech Kocjan
wojciech at kocjan.org
Wed Mar 19 15:41:32 CET 2008
Dnia 19-03-2008 o 15:36:11 Folkert van Heusden <folkert at vanheusden.com>
napisał(a):
> Hi,
>
> In my services.cfg I have:
> define service {
> use generic-service
> host_name p630
> service_description manual call
> contact_groups aix-admins
> active_checks_enabled 0
> passive_checks_enabled 1
> check_command check_dummy
> }
>
> Now in my php script I send the following string (tried both with and
> without terminating \n) to the pipe /var/lib/nagios2/rw/nagios.cmd ;
> [1205935241] PROCESS_SERVICE_CHECK_RESULT;p630;manual call;2;test
That looks correct.
What I'd recommend is to write to /tmp/nagios.cmd, check that file.
Then perform this as the same user as your PHP is run (www-data/apache
probably):
cat /tmp/nagios.cmd >>/var/lib/nagios2/rw/nagios.cmd
You should see if it works.
Also, are you writing or appending to the nagios.cmd pipe?
I think appending is TheRightWay(tm) to do it.
--
Wojciech Kocjan
-------------------------------------------------------------------------
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
More information about the Users
mailing list