nrpe under xinetd

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
matson-itops
Posts: 133
Joined: Wed Nov 18, 2015 11:19 pm

nrpe under xinetd

Post by matson-itops »

Newbie-ish question here.

I have 2 nagios servers and want to be able to monitor the same box (testing)
Is this possible using nrpe under xinetd? i want to add y.y.y.y to the config. can I use allow_from?

Details : ‘nrpe’ under /etc/xinetd.d/nrpe.cfg

# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
type = UNLISTED
port = 5666
socket_type = stream
wait = no
user = nagios
group = nagios
server = /usr/sbin/nrpe
server_args = -c /etc/nagios/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = x.x.x.x
}
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: nrpe under xinetd

Post by dchurch »

Main doc: https://github.com/NagiosEnterprises/nr ... -or-xinetd

Using the only_from directive inside the xinetd config file works if xinetd was compiled with support for tcpwrappers. You can check this if you run the following command:

Code: Select all

if ldd /usr/sbin/xinetd |grep -q libwrap; then echo "xinetd supports tcp wrappers"; else echo "no such luck :-("; fi
Anyway there are essentially three ways to limit the NRPE requests by IP address:

1. Using only_from in the /etc/xinetd.d/nrpe.cfg
2. Using allowed_hosts inside /usr/local/nagios/etc/nrpe.cfg
3. Using a firewall rule

If you're using option 1, you'll want to consult the xinetd.conf man page to figure out how to add multiple addresses there.

With modifying NRPE's config file, if you do that, you'll want to remove the only_from line from the xinetd config.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked