integration of nagios core to nagiosxi
integration of nagios core to nagiosxi
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.
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: integration of nagios core to nagiosxi
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.
Change the nagios.cfg settings to those below. The timeout prevents your Nagios server from spending too much time
on one command.
You will need to create two scripts in the /usr/local/nagios/libexec/eventhandlers (RPM repository
/usr/lib/nagios/plugins/eventhandlers/) directory.
service_check
host_check
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.
Be sure to add this line to your nagios.cfg file.
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
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
/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
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 *
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$'
}
Code: Select all
cfg_file=/usr/local/nagios/etc/objects/misccommands.cfg
Re: integration of nagios core to nagiosxi
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: integration of nagios core to nagiosxi
Have you setup parent child relationships so if the mpls goes down nagios can deduce that the items beyond that are unreachable.
Re: integration of nagios core to nagiosxi
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.
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.
Re: integration of nagios core to nagiosxi
any soulution?
Re: integration of nagios core to nagiosxi
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.
Re: integration of nagios core to nagiosxi
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.
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
Former Nagios employee
Re: integration of nagios core to nagiosxi
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.
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.
Re: integration of nagios core to nagiosxi
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...
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...