integration of nagios core to nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

integration of nagios core to nagiosxi

Post by lntinfo »

Hi i would like to have nagios core alerts in nagiosxi.

how can i move with this.


having 10 nagios slave servers reporting to master..
now i will install fresh instance of nagios xi & those 10 server should report to nagiosxi.
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 »

Here's an example using NSCA

The major goal of the noncentral server is to distribute the results of all service checks to the central server. The noncentral
Nagios machines must use OCSP and OCHP in order to send the proper updates to the central server.

The default nagios.cfg has these settings.

Code: Select all

obsess_over_services=0
#ocsp_command=somecommand
obsess_over_hosts=0
#ochp_command=somecommand
Change the nagios.cfg settings to those below. The timeout prevents your Nagios server from spending too much time
on one command.

Code: Select all

obsess_over_services=1
ocsp_command=service_check
ocsp_timeout=5
obsess_over_hosts=1
ochp_command=host_check
ochp_timeout=5
You will need to create two scripts in the /usr/local/nagios/libexec/eventhandlers (RPM repository
/usr/lib/nagios/plugins/eventhandlers/) directory.

service_check

Code: Select all

#!/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 <CENTRAL_NAGIOS_IP> -c $cfg
host_check

Code: Select all

#!/bin/bash
# Host Check
cmd="/usr/local/nagios/bin/send_nsca"
cfg="/usr/local/nagios/etc/send_nsca.cfg"
host=$1
result=$2
output=$3
/bin/echo -e
"$host\t$result\t$output\n" | $cmd -h <CENTRAL_NAGIOS_IP> -c $cfg

Code: Select all

chmod 755 service_check
chmod 755 host_check
chown nagios:nagios *
Create a file called misccommands.cfg in the /usr/local/nagios/etc/objects (RPM repository /etc/nagios/objects)
directory so you can add the new commands.

Code: Select all

define command{
command_name service_check
command_line $USER1$/eventhandlers/service_check $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'
}
define command{
command_name host_check
command_line $USER1$/eventhandlers/host_check $HOSTNAME$ $SERVICESTATEID$ '$SERVICEOUTPUT$'
}
Be sure to add this line to your nagios.cfg file.

Code: Select all

cfg_file=/usr/local/nagios/etc/objects/misccommands.cfg
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post by ltifst »

Hi,

In my organization we have six locations; we have deployed a Nagios XI server at our central location and configured all other location hosts through MPLS link. Also most we have configured 900 hosts and 3500 services. Now I am facing a challenge in this setup whenever our MPLS link goes down other location hosts are showing down state and availability reports are not cleared.

Any one gives me an idea for overcome in this satiation.

Regards,
litfst
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 »

Have you setup parent child relationships so if the mpls goes down nagios can deduce that the items beyond that are unreachable.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post by ltifst »

Hi,

Yes, I have configured parent child relationships but its showing unreachable during mpls outage we need to monitor other location hosts and if we take month availability reports it should not show unreachable.

Pls. help.
ltifst
Posts: 11
Joined: Tue Aug 07, 2012 10:28 am

Re: integration of nagios core to nagiosxi

Post by ltifst »

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

Re: integration of nagios core to nagiosxi

Post by mguthrie »

To my knowledge the availability report will reflect the unreachable states for the child hosts, which would be accurate in terms of calculating availability. The availability report doesn't currently factor in parent-child relationships for outages.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: integration of nagios core to nagiosxi

Post by nscott »

Was writing the post and mguthrie beat me to the punch, but to reiterate:

That sounds like expected behavior. It should show unreachable when the MPLS is down. The unreachable part doesn't necessarily mean down and that is reflected in some of the Nagios reports, it lists the percentage time it was unreachable and percentage time it was down.
Nicholas Scott
Former Nagios employee
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: integration of nagios core to nagiosxi

Post by lntinfo »

Hi,

Just I am strart doing POC for Nagios xi and core for distributed monitoring, in xi I have enabled inbound transfer setting using NSCA.

Nagios xi is my central server
nagios core is non central server

what I need to do in core? how to install NSCA in core?

Pls. help.
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 the above steps for distribution monitoring, when I am seeing in my noncentral server /var/log/message the below error is comming.

Sep 4 19:40:00 lntnagiosxi nagios: Warning: Attempting to execute the command "/usr/local/nagios/libexec/eventhandlers/host_check XXXXX $SERVICESTATEID$ '$SERVICEOUTPUT$'" resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists...

Sep 4 19:40:10 lntnagiosxi nagios: Warning: Attempting to execute the command "/usr/local/nagios/libexec/eventhandlers/service_check XX.XX.XX.XX 'Ping' 0 'OK - XX.XX.XX.XX: rta 2.213ms, lost 0%'" resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists...

Sep 4 19:40:10 lntnagiosxi nagios: Warning: Attempting to execute the command "/usr/local/nagios/libexec/eventhandlers/service_check XX_XXpore_Pri 'Ping' 0 'OK - XX.XX.XX.XX: rta 6.860ms, lost 0%'" resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists...

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...
Locked