Skip to content

Instantly share code, notes, and snippets.

@rbramley
rbramley / check_sql_query.groovy
Created May 27, 2011 09:56
A service check groovy script to query a database for Opsview
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* Custom SQL check (invoked using check_by_ssh) to ensure app server can query
* the database. Used with Groovy 1.5.6 on Debian Lenny against SQL Server.
*
* Opsview users should use check_sql_advanced for MySQL/PostgreSQL/Oracle or
@rbramley
rbramley / check_many.groovy
Created May 27, 2011 09:28
A groovy script to run multiple Opsview checks and aggregate the return value and status / performance data
/**
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*
* Aggregate Opsview checks.
* @author Robin Bramley, Opsera Limited (c) 2010
*/
@rbramley
rbramley / check_hudson_job.pl
Created May 10, 2011 10:38
Nagios check for Hudson/Jenkins job status using the JSON API
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use JSON;
#
# Check Hudson job status using the JSON API
#
# (c) 2009 Robin Bramley, Opsera Ltd.
# Copying and distribution of this file, with or without modification,