aboutsummaryrefslogtreecommitdiff
path: root/bytemark_example_alerts.sh
blob: a5dfb8e83ef4c61fceb2eb911fc75128bdd7d375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh

PRE="ruby -I lib ./bin/mauveclient localhost"

$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>
<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"

$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 ventham.bytemark.co.uk -i heartbeat -r +10m -c 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 networkmonitor -i ping-ventham -u ventham.bytemark.co.uk -r -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 

$PRE -o vmhs -i 12347 -u eider.bytemark.co.uk \
  -s "eider.bytemark.co.uk heartbeat not received" -r +2m

$PRE -o thresholds -i 1 -u bl1-1.bytemark.co.uk \
  -s "bl1-1 exceeded 10Mb/s on bond0" \
  -d "<h1>Hello there</h1><p>Here is a paragraph</p><p>And another one</p>"

$PRE -o thresholds -i 2 -u bl1-1.bytemark.co.uk \
  -s "bl1-1 has less than 1GB free memory"

$PRE -o vmhs -i 3 -u bl1-1.bytemark.co.uk \
  -s "bl1-1 is shagged."

$PRE -o networkmonitor -i 4 -u bl1-1.bytemark.co.uk \
  -s "bl1-1 is shagged.  Awooga"

$PRE -o thresholds -i 3 -u rom.sh.bytemark.co.uk \
  -s "rom.sh.bytemark.co.uk has 1/2 discs available in /dev/md0" \
  -d "<pre>Personalities : 
unused devices: <none>
</pre>
"