From 99eb81c4447f093f9e4b19a263ab8d1f5e8f8986 Mon Sep 17 00:00:00 2001 From: James Hannah Date: Thu, 26 Jan 2017 10:28:14 +0000 Subject: Pushover support Based on the Hipchat notifier. API Reference: https://pushover.net/api --- lib/mauve/notifiers/templates/pushover.html.erb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/mauve/notifiers/templates/pushover.html.erb (limited to 'lib/mauve/notifiers/templates') diff --git a/lib/mauve/notifiers/templates/pushover.html.erb b/lib/mauve/notifiers/templates/pushover.html.erb new file mode 100644 index 0000000..4506c57 --- /dev/null +++ b/lib/mauve/notifiers/templates/pushover.html.erb @@ -0,0 +1,22 @@ +<%= alert.id%>: <%= alert.update_type.upcase %> (<%= alert.level %>): <% +case alert.update_type +when "cleared" +%><%= alert.cleared_at.to_s_relative %><% +when "acknowledged" +%><%= alert.acknowledged_at.to_s_relative %> by <%= alert.acknowledged_by %> until <%= alert.will_unacknowledge_at.to_s_human %><% +else +%><%= alert.raised_at.to_s_relative %><% +end +%>: <%= alert.subject %> <%= alert.summary %><% +if alert.source != alert.subject +%> -- from <%= alert.source %><% +end +%>.<% +if defined? was_suppressed and defined? will_suppress + if was_suppressed and not will_suppress +%>
Normal service for <%= alert.level %> alerts has resumed.<% + elsif will_suppress and not was_suppressed +%>
Further <%= alert.level %> alerts suppressed until things calm down.<% + end +end +%> -- cgit v1.2.1