integration of nagios core to nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post by ltifst »

any update?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: integration of nagios core to nagiosxi

Post by mguthrie »

Does the following file exist?

/usr/local/nagios/libexec/eventhandlers/service_check

Is it executable?
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: integration of nagios core to nagiosxi

Post 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?
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post 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
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: integration of nagios core to nagiosxi

Post 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...
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post 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]#
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post by ltifst »

any solution?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: integration of nagios core to nagiosxi

Post by scottwilkerson »

We need another piece of data, please run

Code: Select all

ls -ld /usr/local/nagios/libexec/eventhandlers
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked