Hi,<br><br>I have configured a nagios and nsca server, When I run the service check I get the following message in syslog: <br><br>>Jan 6 09:06:58 cl-t036-222cl nsca[31340]: Connection from 10.1.233.10 port 48077<br>>Jan 6 09:06:58 cl-t036-222cl nsca[31340]: Handling the connection...<br>
>Jan 6 09:06:58 cl-t036-222cl nsca[31340]: SERVICE CHECK -> Host Name: 'localhost', Service Description: 'TestMessage', Return Code: '1', Output: 'Service in warning state'command_file=/var/lib/nagios3/rw/nagios.cmd<br>
>Jan 6 09:06:58 cl-t036-222cl nsca[31340]: End of connection...<br><br>The results reach the command_file=/var/lib/nagios3/rw/nagios.cmd<br><br>> cat /var/lib/nagios3/rw/nagios.cmd<br>>[1262786818] PROCESS_SERVICE_CHECK_RESULT;localhost;TestMessage;1;Service in warning state<br>
<br><br>However the results of my passive checks do not reach nagios. The nagios error log files say nothing about the check. What could I be doing wrong?<br><br>Here are my conf files: <br><br>>>>>>>>>nagios.cfg<br>
<br>cat nagios.cfg | grep passive | grep -v '#'<br>log_passive_checks=1<br>accept_passive_service_checks=1<br>accept_passive_host_checks=1<br>translate_passive_host_checks=0<br>passive_host_checks_are_soft=0<br>command_file=/var/lib/nagios3/rw/nagios.cmd<br>
<br>>>>>>>>>nsca.cfg<br>
<br>cat /etc/nsca.cfg | grep -v '#' <br><br>pid_file=/var/run/nsca.pid<br>server_port=5667<br>server_address=10.1.233.52<br>nsca_user=nagios<br>nsca_group=nogroup<br>debug=1<br>command_file=/var/lib/nagios3/rw/nagios.cmd<br>
alternate_dump_file=/var/run/nagios/nsca.dump<br>aggregate_writes=0<br>append_to_file=0<br>max_packet_age=30<br>decryption_method=1<br><br>>>>>>>> localhost_nagios2.cfg <br>define host{<br> use generic-host ; Name of host template to use<br>
host_name localhost<br> alias localhost<br> address 127.0.0.1<br> }<br><br>define command{<br> command_name check_dummy<br> command_line $USER1$/check_dummy $ARG1$<br>
}<br><br>define service{<br> use generic-service<br> name passive_service<br> active_checks_enabled 0<br> passive_checks_enabled 1 # We want only passive checking<br>
flap_detection_enabled 0<br> register 0 # This is a template, not a real service<br> is_volatile 0<br> check_period 24x7<br>
max_check_attempts 1<br> normal_check_interval 5<br> retry_check_interval 1<br> check_freshness 0<br> contact_groups admins <br> check_command check_dummy!0<br>
notification_interval 120<br> notification_period 24x7<br> notification_options w,u,c,r<br> stalking_options w,c,u <br> }<br>define service{<br> use passive_service<br>
service_description TestMessage<br> host_name localhost <br> }<br><br>>>>>>>>>>>>>> The service check<br>#!/bin/sh<br><br>HOST=localhost<br>SERVICE="TestMessage"<br>
NSCAHOST=10.1.233.52<br>echo -e "$HOST\t$SERVICE\t1\tService in warning state" | /usr/sbin/send_nsca -H $NSCAHOST -c /etc/send_nsca.cfg<br>exit 0<br><br><br clear="all"><br>-- <br>( 2b || ! 2b )<br>