Archive for the 'Nagios Plugins' Category

FOSDEM talk about Nagios::Plugin

It feels like it has been ages ago that I took to the stage to give the Lightning talk at FOSDEM about the Nagios Plugins. Actually, it was ages ago, I just never got round to sorting out the screencast of the presentation I gave. Well, now it is sorted and without further ado, you can grab the screencast and the example script from here. Warning, the movie is 35MB. But it’s worth it!

Synopsis: I talk about Nagios, the Plugins and how to create a cool (literally) plugin using the perl module Nagios::Plugin in under 8 minutes.

Update: Permissions on the example check_weather script were wrong, so couldn’t be downloaded. Sorry - I’ve fixed them now.

mysqlclient detection in Nagios Plugins

It’s a real pain writing configure scripts. Autoconf makes things easier, but it is really hard to autodetect software correctly.

The plugins are particularly onerous because usually a single executable, say check_ldap, has requirements that no other plugin has.

Lately, I’ve been trying to work out what’s the best way of detecting mysqlclient. For pre-1.4.7, we used mysql_config to gives us the list of necessary libraries at compile time. On my Debian server, mysql_config --libs says: -L/usr/lib -lmysqlclient -lz -lcrypt -lnsl -lm. This was a much better way than trying to manually work out all the various libraries required. So configure said: “if mysql_config exists, compile check_mysql”.

Good, eh? Nope.
Continue reading ‘mysqlclient detection in Nagios Plugins’

Installing the Nagios Plugins

There has been a bit of confusion about how the Nagios Plugins distribution installs the core C and script plugins. A common scenario is that the plugins are owned as the nagios user. We try to use the standard GNU tool chain mechanisms to install executables and, funnily enough, there is no documented support for installing as a specific user or group.

This is complicated by the fact that there are two plugins, check_dhcp and check_icmp, which have to be run as root, so need to be installed with the setuid bit on and the owner as root.
Continue reading ‘Installing the Nagios Plugins’