0.0
No commit activity in last 3 years
No release in over 3 years
HQ icinga/nagios plugin to show a specific status based on the time
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3.1
>= 0.0.8
>= 1.7.7
>= 10.0.4
>= 2.13.0
>= 0.7.1

Runtime

>= 0.8.0
>= 2.6.0
 Project Readme

HQ check drill

https://github.com/jamespharaoh/hq-check-drill

This is an icinga/nagios plugin which changes state predictably at given times. It is intended to create regular drills, which can be used to test that the monitoring and notifications are working correctly.

Installation

For most use cases, simply install the ruby gem:

gem install hq-check-drill

You can also install the gem as part of a bundle and run it using the "bundle exec" command.

mkdir my-bundle
cd my-bundle
echo 'source "https://rubygems.org"' >> Gemfile
echo 'gem "hq-check-drill"' >> Gemfile
bundle install --path gems

If you want to develop the script, clone the repository from github and use bundler to satisfy dependencies:

git clone git://github.com/jamespharaoh/hq-check-drill.git
cd hq-check-drill
bundle install --path gems

Usage

If the gem is installed correctly, you should be able to run the command with the following name:

hq-check-drill (options...)

If it was installed via bundler, then you will want to use bundler to invoke the command correctly:

bundle exec hq-check-drill (options...)

You will also need to provide various options for the script to work correctly.

General options

--config PATH

Use the --config option to specify the path to the configuration file, which is described below.

Configuration

The configuration file controls the behaviour of the script, defining the times at which it will return a critical status and the message it should display.

Here is an example:

<hq-check-drill-config>
	<drill level="critical" message="this is a drill">
		<match template="%A" regex="Monday"/>
		<match template="%H" regex="09"/>
	</drill>
</hq-check-drill-config>

In this example, we have a single drill, which will be activated weekly on a Monday from 9am to 10am.

You can add as many matches as you want, and match against anything which can be created by ruby's strftime function:

http://www.ruby-doc.org/core-2.0/Time.html#method-i-strftime

You can also add as many drills as you want.