aboutsummaryrefslogtreecommitdiff
path: root/bytemark_example_alerts.sh
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-13 11:02:37 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-13 11:02:37 +0100
commitb22cbc87927553f6dbb5754281e95fe9bad2eed1 (patch)
tree5575791fe84492648a8cc92433c267815056507a /bytemark_example_alerts.sh
parent495c44445642cfae8f23fadde299ad5307f5be58 (diff)
* Tidied up mauveserver to handle HUP restarts
* Added HTML santizing to the alert class, so bad HTML is stripped as part of processing. * Alert#cleared? now means "not raised" * Better error handling in the Timer class, making sure that the timer never gets permanently frozen. * Moved notification and packet buffers to the Server class, meaning that if the Processor or Notifier threads crash, we don't lose all the items waiting to be processed/notified. * XMPP/Email Alerts now use templates, instead of instance methods. * Emails now get sent as multipart with HTML to allow detail fields to be shown as nature intended.
Diffstat (limited to 'bytemark_example_alerts.sh')
-rwxr-xr-xbytemark_example_alerts.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/bytemark_example_alerts.sh b/bytemark_example_alerts.sh
index 6e90c5c..916ffb5 100755
--- a/bytemark_example_alerts.sh
+++ b/bytemark_example_alerts.sh
@@ -5,13 +5,15 @@ PRE="ruby -I lib ./bin/mauveclient 127.0.0.1 "
$PRE -o supportbot -i 173123 \
-s "My server is not responding" \
-d "<strong>From:</strong> John Smith &lt;john@smith.name><br/>
-#<strong>To:</strong> support@support.bytemark.co.uk</br/>
-#<br/>
-#<pre>It has been several hours now since I have been able to contact my server
-#foo.bar.bytemark.co.uk. I am very upset that blah blah blah blah
-#and furthermore by business is under threat because &pound;15.00 per month
-#is far too much blah blah blah</pre>
-#"
+<strong>To:</strong> support@support.bytemark.co.uk</br/>
+<br/>
+<pre>It has been several hours now since I have been able to contact my server
+foo.bar.bytemark.co.uk. I am very upset that blah blah blah blah
+and furthermore by business is under threat because &pound;15.00 per month
+is far too much blah blah blah</pre>
+<script>alert('arse')</script>
+<h1>Brokent<p></h1></p>html.
+"
$PRE -o networkmonitor -i 1 -u cr01.man.bytemark.co.uk \
-s "cr01.man.bytemark.co.uk did not respond to pings"
@@ -20,13 +22,12 @@ $PRE -o networkmonitor -i 2 -u cr01.thn.bytemark.co.uk \
-s "cr02.man.bytemark.co.uk refused SSH connection" \
-d "<pre>ssh: connect to host localhost port 1212: Connection refused</pre>"
-$PRE -o vmhs -i 12346 -u ventham.bytemark.co.uk \
- -s "ventham.bytemark.co.uk heartbeat not received" -r +5
-
+$PRE -o ventham.bytemark.co.uk -i heartbeat -r now -s "<b>heartbeat</b> <script>alert('arse')</script> failed for ventham.bytemark.co.uk" --detail="<p>The heartbeat wasn't sent for the host ventham.bytemark.co.uk</p><p>This indicates that the host might be down</p>" >/dev/null
-$PRE -o vmhs -i 12345 -u partridge.bytemark.co.uk \
- -s "partridge.bytemark.co.uk heartbeat not received" -r +10 -c now
+$PRE -o networkmonitor -i ping-ventham -u ventham.bytemark.co.uk -r +10m -s "ping failed for ventham.bytemark.co.uk"
+$PRE -o vmhs -i 12345 -u partridge.bytemark.co.uk \
+ -s "partridge.bytemark.co.uk heartbeat not received" -r +10m -c now
$PRE -o vmhs -i 12347 -u eider.bytemark.co.uk \
-s "eider.bytemark.co.uk heartbeat not received" -r +2