NSCA submit_check not exe
Posted: Wed Jan 23, 2013 10:25 am
Hi!
I configured the nagios with nsca, in CentOS 6.3 (x64).
On the slave (nsca-client):
If I run the submit_service_check.sh with manually, then it send the data to the master (nsca server, IP: 10.10.10.116). So it is ok.
But the slave nagios doesn't send automatically the check results.
Why? What is missing? What settings need to be set for auto submit check results?
G.
I configured the nagios with nsca, in CentOS 6.3 (x64).
On the slave (nsca-client):
Code: Select all
obsess_over_services=1
ocsp_command=submit_service_check
ocsp_timeout=5
# /etc/nagios/conf.d/commands.cfg
define command {
command_name submit_service_check
command_line $USER1$/submit_service_check.sh $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'
# $USER1$ -> /usr/lib64/nagios/plugins/
}
define service{
name generic-service2;
active_checks_enabled 1 ;
passive_checks_enabled 1 ;
parallelize_check 1 ;
obsess_over_service 1 ;
check_freshness 0 ;
notifications_enabled 0 ;
event_handler_enabled 1 ;
flap_detection_enabled 1 ;
process_perf_data 1 ;
register 0 ;
}
# Service definition for http
define service{
use generic-service2;
host_name host1;
service_description HTTP;
is_volatile 0;
check_period 24x7;
max_check_attempts 3;
normal_check_interval 1;
retry_check_interval 5;
# contact_groups admins,webmaster;
notification_options w,u,c,r;
notification_interval 960;
# notification_period never;
notification_period 24x7;
check_command check_http;
}
define host {
use linux-server;
host_name host1;
address 10.10.10.90;
}
The /usr/lib64/nagios/plugins/submit_service_check.sh:
#!/bin/bash
/usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | /usr/lib64/nagios/plugins/send_nsca -H 10.10.10.116 -c /etc/nagios/send_nsca.cfg
But the slave nagios doesn't send automatically the check results.
Why? What is missing? What settings need to be set for auto submit check results?
G.