Blog posts with tag OpenBSD

Nagios Plugin - Check Relayd

Comprehensive perl relayd checker.

NOTE:- Requires Perl 5.8 or higher

Nagios user will need sudo access - suggest adding line below to sudoers

_nagios ALL=(ALL) NOPASSWD: /usr/sbin/relayctl show summary

This plugin is designed to run on a local host, if Nagios is not local I suggest you run it via NRPE. However if you are running this on a firewall I would recommend not using NRPE and run a local Nagios useing OCSP/OCHP to pass messages back to your main Nagios.


Check_relayd checks that all redirect & relays loaded by relayd are active. If a redirect/relay or table are down/empty it will give a CRITICAL message with information regarding what has failed. If host(s) are down in a given redirect/relay then it will give a WARNING unless there are 0 up for that relay/redirect in which case it will give a CRITICAL.

If relayd returns any unexpected output (command failure, system errors) this program will return a CRITICAL.

check_relayd [ARGS]

-h, -?, --help

Print Help Information

-V, --version

Print Version Information

-r, --relay, --redirect

Optional -r argument you can give a list of the expected relays/redirect separated by commas (,). If it does not find the relay/redirect return CRITICAL. If a relay/redirect is found that is not defined return WARNING (unless you also use -n see below).

-n, --nowarn

If -n is used do not warn for unexpected relay/redirect found so that we can test just for a single relay/redirect.

If you need any support or help with this plugin or if you find any cool ways of improving it please let me know. Download from Nagios Exchange

Posted on 14 June 2011 by SysPete [Permalink]