nagios

One-touch provisioning and auto-monitoring of new servers

I've recently been doing some very innovative work for the very clever gents at Code Enigma, where I've been working on some interesting projects:

1. an automated 'zero-touch' dev/stage/live deployment system for their enterprise Drupal applications (developers no longer need to ssh in to servers to do deployments)

2. automatic 'one-touch' provisioning and configuration of new hosting cloud services.

(More on the dev/stage/live zero-touch deployment soon :) )

Squelching SMS floods from Nagios being sent via a third party SMS provider

So at work they implemented some 'SMS Squelching' methods to interact with a 'mail > sms' gnokii script to try and 'squelch' megaloads of SMSs that come through from Nagios all at once. It's a bunch of perl and very much specific to working with a serial-attached Nokia and gnokii. The way it essentially worked was that if an SMS got queued to mail2smsgnokii/gsm's spool, the timestamp was compared with the last sms that got sent and if the length of time in between SMS was inside a threshold (say 30 minutes), the SMS would not be sent.

Nagios website regex pattern check

Here's a simple perl script that uses curl to search for a regex pattern on a website.

It returns status values that are Nagios compatible. This means you can write a command definition for Nagios that looks like this:

# regex check
define command{
        command_name    check_regex
        command_line    /usr/lib/nagios/plugins/check_regex $ARG1$ $ARG2$
}

And write a couple of service definitions like this:

define service {
        host_name                       foo
        service_description           foo regex

Pages

Subscribe to RSS - nagios