aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-29 10:30:01 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-29 10:30:01 +0000
commit077fe0d75bc96341f5e9db54c0047ef90f4cdc61 (patch)
treee6731b50dd24ecadc8342bcfc746c0d6d9fe17f4 /bin
parentb5d3d793deedd60ebd5dda9056d012ae3a9411a8 (diff)
Added suppression option to the mauve client.
Diffstat (limited to 'bin')
-rw-r--r--bin/mauvesend9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/mauvesend b/bin/mauvesend
index a61af49..353ab0c 100644
--- a/bin/mauvesend
+++ b/bin/mauvesend
@@ -74,6 +74,13 @@
# no time is specified, "now" is assumed. See
# SPECIFYING TIMES below for the format of <time>.
#
+# --suppress, -e <time> Notifications about this alert should not be sent
+# until the given time. This allows notifications
+# about flapping alerts to be suppressed for a period
+# of time, or alerts about planned maintenance to be
+# suppressed. See SPECIFYING TIMES below for the
+# format of <time>.
+#
# SPECIFYING TIMES
#
# Times can be specified for an alert to be raised or cleared. This can be
@@ -240,6 +247,7 @@ begin
['-u', '--subject', GetoptLong::OPTIONAL_ARGUMENT],
['-c', '--clear', GetoptLong::OPTIONAL_ARGUMENT],
['-r', '--raise', GetoptLong::OPTIONAL_ARGUMENT],
+ ['-e', '--suppress', GetoptLong::OPTIONAL_ARGUMENT],
['-d', '--detail', GetoptLong::OPTIONAL_ARGUMENT],
['-v', '--verbose', GetoptLong::NO_ARGUMENT]
).each do |opt,arg|
@@ -280,6 +288,7 @@ begin
when '-d' then message.detail = arg
when '-c' then message.clear_time = parse_time_spec(arg).to_i
when '-r' then message.raise_time = parse_time_spec(arg).to_i
+ when '-e' then message.suppress_until = parse_time_spec(arg).to_i
else
error "Unknown option #{opt}"
end