Nagios client server configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Nagios client server configuration

Post by vuduops »

Hi;

It is my understanding the using nrpe agent the remote/client servers listens on port 5666 and the monitoring nagios server calls the remote/client server to pull the data and report it on the UI.

Does nagios support a remote agent on client pushing the data instead on the nagios monitoring server pulling the data?

Any help regarding an agent that supports this kind of configuration is appreciated.

Thanks
Srikrishna
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Nagios client server configuration

Post by bwallace »

That is certainly possible and is what we refer to as 'passive checks'. This method has been in use for a long time and here is a doc explaining the details thereof and how to configure passive checks. Note that you'll have to install NDRP to facilitate the transfer of data from the client to XI.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Be sure to check out the Knowledgebase for helpful articles and solutions!
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Re: Nagios client server configuration

Post by vuduops »

Can the nrdp support all the nagios plugin scripts and show similar output on the nagios monitoring server ?


-Krishna
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios client server configuration

Post by rkennedy »

Most should as long as you have any per-requisisties needed to run them, yes, that's the exact use case for the remote agent.

Here's a few more documents that may help you with it -
https://assets.nagios.com/downloads/nrd ... erview.pdf
https://assets.nagios.com/downloads/nag ... ith_XI.pdf
Former Nagios Employee
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Re: Nagios client server configuration

Post by vuduops »

Are there any documents you can share that show how to configure plugins check on remote host over the command line?

For example nrpe we can add the plugins to nrpe.cfg which allows us to run the checks on the remote server. Where do we add the checks on the remote server for nrdp or nsca.

Also is ncpa still supported by nagios?

Can I use nrpe to run the passive checks and use nrdp to report the data on Nagios?

-krishna
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios client server configuration

Post by avandemore »

This has already been posted but since it answers a question asked here it is again: NRDP – Overview

Yes, ncpa is supported. You can find documentation here: NCPA Documentation

Code: Select all

Can I use nrpe to run the passive checks and use nrdp to report the data on Nagios?
Yes, it's possible to basically do anything in this regard. I don't understand what would be the use case for such a setup though, especially one that isn't answered by a better existing path. Can you describe your problem in detail?
Previous Nagios employee
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Re: Nagios client server configuration

Post by vuduops »

We currently use hobbit as our monitoring tool. The hobbit architecture the client is designed to push data to the monitoring servers versus the nagios architecture in which the monitoring server pulls data from the client servers.

In our initial integration phase with nagiosxi. We used the nrpe client and found that nrpe keeps listening on port 5666 for the monitoring server to pull the data. We would like the client to initiate the connection when sending the data. The reason behind it is we have PCI servers where we only allow outbound access and no inbound access.

Hope the background is helpful. Also I tested ncpa and it seems to act similar to the nrpe agent where it is listening on a port and waiting for the monitoring server to pull the data.

Do any of the agents support the hobbit architecture?

-Krishna
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios client server configuration

Post by avandemore »

vuduops wrote:We currently use hobbit as our monitoring tool. The hobbit architecture the client is designed to push data to the monitoring servers versus the nagios architecture in which the monitoring server pulls data from the client servers.
Nagios actually can do both simultaneously but yes the standard method is to poll for data.

NRPD and other functionality like snmp traps are designed for such passive use. I'm not sure we're on the same page here though. NRPE and NRPD are complete separate addons. NRPD is just a transport mechanism. The checks and data itself NRPD is agnostic about.
Previous Nagios employee
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Re: Nagios client server configuration

Post by vuduops »

EDIT: Please wrap output in code tags

Here is my current configuration on the remote host. I am currently running checks locally on the remote server as enclosed below. I see the nrpe agent is listening on port 5666, which I believe is because it is waiting for the nagios monitoring server to pull the data. My question is if the remote server is sending the data to the nagios server why is it listening on port 5666 all the time?

Code: Select all

$ netstat -an | grep 5666
tcp        0      0 0.0.0.0:5666                0.0.0.0:*                   LISTEN      
tcp        0      0 :::5666                     :::*                        LISTEN      

Code: Select all

$ cat /etc/nrpe.d/centos-nrpe.cfg 
#############################################################################
# Sample NRPE Config File 
# 
#
# NOTES:
# This is a sample configuration file for the NRPE daemon.  It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.
#############################################################################

# The following examples use hardcoded command arguments...
#Check cpu utilization statistics, (user,system,iowait,idle,nice and steal %) with iostat external program 
#Alert if user,system,iowait is 90,50,40.
command[check_cpu_stats]=/usr/lib64/nagios/plugins/check_cpu_stats.sh -w 70,40,30 -c 90,50,40

#Checks /boot for 30%/10% and / for 10/5%. All remaining volumes use 15/10
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -C -w 30% -c 10% -p /boot -C -w 10% -c 5% -p /

# Alert if memory usage is over 80 and 90 and swap usage is over 70 and 80
command[check_mem]=/usr/lib64/nagios/plugins/check_mem -w 80 -c 90 -W 70 -C 80

# Warn if the server has reboot in that last 60 minutes
command[check_uptime]=/usr/lib64/nagios/plugins/check_uptime -w 60:

#Alert if CPU of total processes over 150 or 200
command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200 --metric=CPU

#Check the iostats for a device 
command[check_iostat]=/usr/lib64/nagios/plugins/check_iostat.sh -d vda -i -p

#Alert if any of the process with status "RSZDT" is over 30 and 50 %
command[check_state]=/usr/lib64/nagios/plugins/check_procs -s RSZDT --metric=CPU -w 30 -c 50

#Alert if time offset in over 0.5 and 1 second
command[check_ntp]=/usr/lib64/nagios/plugins/check_ntp.pl -H opsvirthost1.mlp.marquee.net -w .5 -c 1

#Alert if SSH process is not running
command[check_ssh]=/usr/lib64/nagios/plugins/check_ssh localhost

#ALert if NPRE procees is not running 
command[check_nrpe]=/usr/lib64/nagios/plugins/check_nrpe -H localhost

#ALert if hobbit procees is not running 
command[check_hobbit]=/usr/lib64/nagios/plugins/check_ps.sh -p hobbit

#ALert if hobbit procees is not running 
command[check_splunkd]=/usr/lib64/nagios/plugins/check_ps.sh -p splunkd

#ALert if users logged in are more that 5 or 10
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10

#Alert if the entropy is less that 100 or 50 
command[check_entropy]=/usr/lib64/nagios/plugins/check_entropy.py 
Thanks
Krishna
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios client server configuration

Post by avandemore »

NRPE is an active agent, not a passive one like NRPD.
Previous Nagios employee
Locked