I’ve been moving some services around lately. A server is dying and I need to move stuff off it. Today I managed to move Bacula and Nagios onto a new server. After a short bit of struggle, I had just one service check that was failing: check_ping.
Here’s the example:
$ /usr/local/libexec/nagios/check_ping -H bast.example.org -w 3000.0,80% -c 5000.0,100% -p 1 CRITICAL - You need more args!!! Could not open pipe:
Google searches did not help.
So I tried ping from the command line… and as I was typing it… I realized: I’m in a jail.
Solution: well documented in many places. Enable raw sockets in jails. Recompile nagios-plugsins with jail support. Restart the jails.
Summary: add this to /etc/sysctl.conf:
security.jail.allow_raw_sockets=1
Issue this command:
# sysctl security.jail.allow_raw_sockets=1 security.jail.allow_raw_sockets: 0 -> 1
Add the jail support to the plugins:
cd /usr/ports/net-mgmt/nagios-plugins make config
Make sure you have this option checked:
[x] JAIL Compilation within jail(8) (see Makefile)
Then rebuild the plugings:
portupgrade -f nagios-plugins
Then restart your jails.
Correction!
Misspelled title: ngaios.
Good article. Next user will find out in google how to loosen bars in jail. :)
—
Bests
Marcin
I used to live in Nagio.
I use Nagios
You can see why I mistype them from time to time.
Thanks. Title fixed. URL will retain the original error.