Hi,
How should one proceed to display all nagios core checks results in NagiosXI Server
Reading:
http://support.nagios.com/forum/viewtop ... 29&p=54362
https://assets.nagios.com/downloads/gen ... r_MSPs.pdf
NSCA
nagios core + nagiosxi + Nagios Federated Monitoring
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: nagios core + nagiosxi + Nagios Federated Monitoring
This is straightforward.
You use nsca on the XI server (already setup, you just have to fiddle with inbound transfer settings)
You use send_nsca on the Core servers, wrapped up with a command that is defined as your ocsp_command and ochp_command:
With wrappers that look like this- ish:
submit_ochp.sh:
submit_ocsp.sh
Don't forget to configure nsca.cfg (handled by inbound transfer on the XI box) and send_nsca.cfg:
Enable the proper settings in nagios.cfg on your core box:
And then also make sure that your hosts/services you want to be submitted have the obsess bit turned on,
For hosts:
For services:
Have fun.
You use nsca on the XI server (already setup, you just have to fiddle with inbound transfer settings)
You use send_nsca on the Core servers, wrapped up with a command that is defined as your ocsp_command and ochp_command:
Code: Select all
define command{
command_name ochp_submit
command_line $USER1$/submit_ochp.sh $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$' '$HOSTPERFDATA$'
}
define command{
command_name ocsp_submit
command_line $USER1$/submit_ocsp.sh $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$' '$SERVICEPERFDATA$'
}With wrappers that look like this- ish:
submit_ochp.sh:
Code: Select all
#!/bin/bash
CMD=/usr/sbin/send_nsca
CFG=/etc/nagios/send_nsca.cfg
HOST=$1
RESULT=$2
OUTPUT="$3"
PERF="$4"
printf "%b" "${HOST}\t${RESULT}\t${OUTPUT}|${PERF}\n" | $CMD -H nagiosxi.example.com -c $CFGCode: Select all
#!/bin/bash
CMD=/usr/sbin/send_nsca
CFG=/etc/nagios/send_nsca.cfg
HOST=$1
SRV=$2
RESULT=$3
OUTPUT="$4"
PERF="$5"
printf "%b" "${HOST}\t${SRV}\t${RESULT}\t${OUTPUT}|${PERF}\n" | $CMD -H nagiosxi.example.com -c $CFGCode: Select all
password=blablablabla
encryption_method=3Enable the proper settings in nagios.cfg on your core box:
Code: Select all
obsess_over_services=1
obsess_over_hosts=1
ocsp_timeout=5
ocsp_command=ocsp_submit
ochp_command=ochp_submitFor hosts:
Code: Select all
obsess_over_host 1Code: Select all
obsess_over_service 1Re: nagios core + nagiosxi + Nagios Federated Monitoring
Hi jdalrymple,
thanks for reply will try & let you know
thanks for reply will try & let you know
Re: nagios core + nagiosxi + Nagios Federated Monitoring
Let us know if you run into some issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!