From b6af48a862d67d7313e6399f20c4a438b21cc3b3 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 6 Dec 2012 10:56:47 +0000 Subject: Added script to report on parse failures. --- bytemark/bin/custodian-enqueue-parse-test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bytemark/bin/custodian-enqueue-parse-test (limited to 'bytemark/bin') diff --git a/bytemark/bin/custodian-enqueue-parse-test b/bytemark/bin/custodian-enqueue-parse-test new file mode 100755 index 0000000..abd90f5 --- /dev/null +++ b/bytemark/bin/custodian-enqueue-parse-test @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Parse the two configuration files we use, and alert if there +# is a failure. +# + +for file in bytemark.cfg managed-clients.cfg ; do + + if ( ! custodian-enqueue --test --file /etc/custodian/$file >/dev/null 2>/dev/null ); then + mauvesend alert.bytemark.co.uk -i custodian-enqueue-$file -r now -s "Parse failure from custodian-enqueue against $file." --detail="

The file was not added to the queue successfully due to syntax error. Please fix.

" + else + mauvesend alert.bytemark.co.uk -i custodian-enqueue-$file -c now -s "Parse failure from custodian-enqueue against $file." --detail="

The file was not added to the queue successfully due to syntax error. Please fix.

" + + fi + +done -- cgit v1.2.1