OpenBSD Journal

Monitoring relayd(8) with Nagios

Contributed by jason on from the dont-forget-your-business-monitors-too dept.

The Nagios Exchange recently added check_relayd, a new check which monitors an OpenBSD relayd(8) service for health and availability. It was written by Philip Garner of Sysnix and published on the Exchange just a couple days ago. From the description:

Comprehensive perl relayd checker.

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 strongly [recommend] not using 
NRPE and run a local Nagios [using] OCSP/OCHP to passive messages back to your main 
Nagios. 

Usage: 

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

-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 returns CRITICAL. If a relay/redirect fond that
is not defined returns WARNING.

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

Editor's Note: Reviewing the check's source code, it does a basic inspection on the output of relayctl show summary, looking for active status on redirection or relay entries. There is no performance data passed back in the output, so users looking for trending data should continue to use an alternative graphing utility.

(Comments are closed)


Comments
  1. By jirib (jirib) jirib@mailinator.com on

    relayd can send snmp trap when state of a host changes. maybe it would be nice if relayd status could be requested via snmp get from a nms.

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]