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.
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:
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
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.