NRPE checks and installation

Has anyone installed NRPE on a VyOS host?

I was looking for advice, or maybe a point in the right-direction to learn, on how to install a package on a vyos router. Is there a way to have it built into the ISO when executing a Native Build? or is there a way to install nrpe on an already install vyos image? Working with 1.5 in my lab.

Thank you.

Screenshot taken from here.

1 Like

I run NRPE within a container. I built a Docker image for this purpose, feel free to pull it.

Config:

set container name nrpe-init allow-host-networks
set container name nrpe-init capability 'net-raw'
set container name nrpe-init image 'incitem/almalinux9:nrpe-init'
set container name nrpe-init volume nrpe-cfg destination '/etc/nagios/nrpe.cfg'
set container name nrpe-init volume nrpe-cfg source '/config/containers/nrpe-init/nrpe.cfg'
set container name nrpe-init volume nrpe-cfg-local destination '/etc/nrpe.d/incitem.cfg'
set container name nrpe-init volume nrpe-cfg-local source '/config/containers/nrpe-init/custom.cfg'
set container name nrpe-init volume nrpe-log destination '/var/run/nrpe.log'
set container name nrpe-init volume nrpe-log source '/config/containers/nrpe-init/nrpe.log'

Contents of /config/containers/nrpe-init/nrpe.cfg:

log_facility=daemon
log_file=/var/run/nrpe.log
debug=0
pid_file=/run/nrpe/nrpe.pid
server_port=5666
nrpe_user=nrpe
nrpe_group=nrpe
allowed_hosts=127.0.0.1,::1
dont_blame_nrpe=0
allow_bash_command_substitution=0
command_timeout=1800
connection_timeout=300
disable_syslog=0
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
include_dir=/etc/nrpe.d/

Contents of /config/containers/nrpe-init/custom.cfg:

######################################
# Do any local nrpe configuration here
######################################

command_timeout=1800
debug=1

# add all allowed hosts here
allowed_hosts=127.0.0.1,x.x.x.x,y.y.y.y

# add custom checks here
1 Like

Out of interest, what information would one get using NRPE which would not be available using SNMP?

One example is the ability to use PKI to log into a host and run a ping command as a monitoring check. This is very helpful for tunnels that may show Up due to virtual interfaces always being in an Up state. Or maybe they stopped passing traffic due to some network event but show up. Or perhaps you want to screen scrape output, such as check the last handshake time for a tunnel.

How will it work? I am not sure, but I would like to experiment.

Thanks everyone for the input.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.