This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Adds display of sparkline chart, if present, for an alert.

  • Loading branch information...
1 parent de4993b commit 312611c2bd5d72320cd60d43b8fc164e3e5f36cb @gstark gstark committed Aug 25, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/scripts/scoutapp.coffee
@@ -38,10 +38,12 @@ module.exports = (robot) ->
# "metric_name": "last_minute",
# "metric_value": 3.5,
# "severity": "warning", // warning = normal threshold, critical = SMS threshold
- # "url": "https://scoutapp.com/a/999999"
+ # "url": "https://scoutapp.com/a/999999",
+ # "sparkline_url":"https://scoutapp.com/alert_sparkline.png"
# }
robot.messageRoom room, "Scout #{data.severity} - #{data.server_name} on host #{data.server_hostname} #{data.lifecycle}ed - #{data.plugin_name} - #{data.title} - Current value #{data.metric_name}=#{data.metric_value} - Details: #{data.url}"
+ robot.messageRoom room, data.sparkline_url if data.sparkline_url
# Send back an empty response
res.writeHead 204, { 'Content-Length': 0 }

0 comments on commit 312611c

Please sign in to comment.