Page 2 of 3
Re: integration of nagios core to nagiosxi
Posted: Tue Sep 04, 2012 9:56 am
by ltifst
any update?
Re: integration of nagios core to nagiosxi
Posted: Tue Sep 04, 2012 10:25 am
by mguthrie
Does the following file exist?
/usr/local/nagios/libexec/eventhandlers/service_check
Is it executable?
Re: integration of nagios core to nagiosxi
Posted: Wed Sep 12, 2012 10:30 am
by ltifst
Hi,
I have done all you mentioned setting in Nagios core, I am getting the below error. I am using Nagios xi as a server in that I have enable outbound transfers. In core I have created service_check & host_check files
[root@NagiosCore bin]# ./send_nsca -H localhost -p 5667 -c /usr/local/nagios/etc/send_nsca.cfg
Error: Timeout after 10 seconds
Pls. help.
Re: integration of nagios core to nagiosxi
Posted: Wed Sep 12, 2012 10:55 am
by mguthrie
Here's the error that you're getting:
Sep 4 19:40:10 lntnagiosxi nagios: Warning: Attempting to execute the command "/usr/local/nagios/libexec/eventhandlers/service_check XX_sing_bakro 'Serial0/0/0 Status' 0 'OK: Interface Serial0/0/0 (index 3) is up.'" resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists...
Can you confirm the following file exists?
/usr/local/nagios/libexec/eventhandlers/service_check
Is it executable?
Re: integration of nagios core to nagiosxi
Posted: Wed Sep 12, 2012 11:04 am
by ltifst
Yes, is there and its an executable, find the below inside stuff.
#!/bin/bash
# Service Check
cmd="/usr/local/nagios/bin/send_nsca"
cfg="/usr/local/nagios/etc/send_nsca.cfg"
host=$1
srv=$2
result=$3
output=$4
/bin/echo e
"$host\t$srv\t$result\t$output\n" | $cmd -h xx.xx.xx.xx -c $cfg
Re: integration of nagios core to nagiosxi
Posted: Wed Sep 12, 2012 11:39 am
by ltifst
is the service_check file is correct? Pls. confirm.
I have modified service_check file as below
after that I am getting below response.
[root@NagiosCore eventhandlers]# ./service_check
0 data packet(s) sent to host successfully.
#!/bin/bash
# Service Check
cmd="/usr/local/nagios/bin/send_nsca"
cfg="/usr/local/nagios/etc/send_nsca.cfg"
host=$1
srv=$2
result=$3
output=$4
/bin/echo "$host\t$srv\t$result\t$output\n" | $cmd -H 172.29.22.39 -c $cfg
Re: integration of nagios core to nagiosxi
Posted: Wed Sep 12, 2012 3:12 pm
by mguthrie
Can you post the output from:
Code: Select all
ls -l /usr/local/nagios/libexec/eventhandlers
The issue still seems to point to permissions or an issue with the directory location, just haven't nailed down how yet...
Re: integration of nagios core to nagiosxi
Posted: Thu Sep 13, 2012 1:56 am
by ltifst
Pls. find the below output.
[root@NagiosCore eventhandlers]# ls -l
total 36
-rwxr-xr-x. 1 nagios nagios 828 Aug 29 16:34 disable_active_service_checks
-rwxr-xr-x. 1 nagios nagios 759 Aug 29 16:34 disable_notifications
drwxr-xr-x. 2 nagios nagios 4096 Aug 29 16:34 distributed-monitoring
-rwxr-xr-x. 1 nagios nagios 827 Aug 29 16:34 enable_active_service_checks
-rwxr-xr-x. 1 nagios nagios 760 Aug 29 16:34 enable_notifications
-rwxr-xr-x 1 nagios nagios 204 Sep 12 21:56 host_check
drwxr-xr-x. 2 nagios nagios 4096 Aug 29 16:34 redundancy-scenario1
-rwxr-xr-x 1 nagios nagios 219 Sep 12 22:25 service_check
-rwxr-xr-x. 1 nagios nagios 1184 Aug 29 16:34 submit_check_result
[root@NagiosCore eventhandlers]# ./submit_check_result
[root@NagiosCore eventhandlers]# ./submit_check_result
[root@NagiosCore eventhandlers]#
Re: integration of nagios core to nagiosxi
Posted: Thu Sep 13, 2012 9:42 am
by ltifst
any solution?
Re: integration of nagios core to nagiosxi
Posted: Thu Sep 13, 2012 10:36 am
by scottwilkerson
We need another piece of data, please run
Code: Select all
ls -ld /usr/local/nagios/libexec/eventhandlers