Commit Graph

152 Commits

Author SHA1 Message Date
Evan Baker
6a3dfaff45 Add Slack additional "fields" to notifications (#1135)
* impl slack fields

* wrap title and value in tmplText
2017-12-15 12:18:05 +01:00
Jose Donizetti
d75ff37a38 Refactor inhibit stage (#1105)
* Refactor BuildPipeline to receive a muter

* Remove marker not used by InhibitStage
2017-12-14 16:22:31 +01:00
stuart nelson
7736ea0f61
Add footer field for slack messages (#1141) 2017-12-12 22:50:41 +01:00
berlinsaint
6bab629590 Add notify support for Chinese User wechat (#1059)
* WECHAT support by ybyang2/berlinsaint

* correct the whitespace

* add some TestFile and modify some naming errors by ybyang2/berlinsaint

* modify wechat retry test expect

* template error

* add newline
Signed-off-by: yb_home <berlinsaint@126.com>

* fmt some pr code

* use the @stuartnelson3 the test-ci-wechat bingdata.go

* notify go add wechat
2017-12-09 16:20:22 +01:00
Demitri Morgan
b62cddd807 Removed incorrect end-of-support warning (#1131)
The PagerDuty Events API (v1), used by integrations with monitoring tools, will continue to be supported. There are currently no plans to deprecate, end support for or sunset it.

The end-of-support notice cited in the log message removed applies only to the *REST API* version 1, which PagerDuty will no longer support as of February 2018, but which Prometheus does not use.
2017-12-09 15:17:17 +01:00
stuart nelson
3464ab4fa2
Template Source in PagerDuty alert payload (#1117)
* Template Source field in pagerduty payload

As a sane default we link to alertmanager, but
leave templating available to the user if
something suits their system better.
2017-11-22 14:51:44 -05:00
Tom Fawcett
8bfbb0a1aa Fix OpsGenie Tags field (#1108) 2017-11-15 17:20:02 -05:00
Tom Fawcett
291fc5722b Fix OpsGenie Teams field (#1101)
* Fix OpsGenie Teams field

* Remove use of opsGenieTeam struct
2017-11-15 16:00:50 -05:00
Tom Fawcett
fd0ace8d88 Support OpsGenie Priority field (#1094) 2017-11-12 12:01:19 -05:00
Jose Donizetti
7fbe63b94f Add tests to retries (#1084)
* Add tests to retry logic

* Extract retry logic from OpsGenie,VictorOps,PushOver
2017-11-11 15:45:11 +01:00
Jose Donizetti
76c15a0ef5 Fix config name inconsistency (#1087)
* Rename global config hipchat_url to hipchat_api_url

* Rename opsgenie config 'host' to 'url'
2017-11-11 15:01:21 +01:00
Jose Donizetti
74808e40f3 Refactor silence constants (#1076)
* Refactor remove dups silence state constants

* Refactor to use const instead of string
2017-11-07 11:36:30 +01:00
stuart nelson
0cbc8dff18 Rearrange some notification code 2017-11-07 11:32:37 +01:00
Steven Carvellas
5db8055bab Add support for PagerDuty API v2 (#1054) 2017-11-07 11:07:27 +01:00
Adam Smith
4ee40f97e6 Allow template in victorops routing_key field (#1083) 2017-11-07 10:38:46 +01:00
Julius Volz
b0aab04906 Fix notifications for flapping alerts (#1071)
Fixes https://github.com/prometheus/alertmanager/issues/1063
2017-11-02 11:12:12 +01:00
Julius Volz
9b72c10134 Minor code cleanups 2017-11-01 23:08:34 +01:00
Jose Donizetti
f8dc12c317 Remove not used code (#1069) 2017-11-01 16:40:46 +01:00
Tom-Fawcett
2d1b84ff5e Upgrade OpsGenie notifier to v2 API. (#1061) 2017-10-29 16:19:17 +01:00
Jose Donizetti
1c7bf17eec Add logging to statemessage truncation (#1056) 2017-10-26 11:09:54 +02:00
Jose Donizetti
877d2780a0 Add limit to OpsGenie message (#1045) 2017-10-26 11:09:23 +02:00
Jose Donizetti
0a16b09fc1 Fix pushover limits (title, message, url) (#1055) 2017-10-25 14:44:35 +02:00
Julius Volz
947970af44 Convert Alertmanager to use non-global go-kit loggers
Fixes https://github.com/prometheus/alertmanager/issues/1040
2017-10-22 00:20:40 -07:00
Carlos Alexandro Becker
4a8e710691 Allow template in victorops message_type field (#1038) 2017-10-11 15:42:10 +02:00
Frederic Branczyk
ff9e5270c7 Merge pull request #1026 from brancz/marker-race
Remove .WasInhibited and .WasSilenced fields of Alert type
2017-10-10 16:49:55 +02:00
Frederic Branczyk
0ef6695055
*: Remove .WasInhibited and .WasSilenced fields of Alert type 2017-10-10 15:50:15 +02:00
Conor Broderick
10b9d34f80 Initialise notifications_total and notifications_failed_total (#1011) 2017-10-07 11:57:53 +02:00
Alin Sinpalean
4931c9206e Fix multipart email implementation: (#1009)
* Don't send parts with empty templates.
 * Add a MIME-Version: 1.0 header.
 * Place text/html part last, as parts are supposed to be in increasing preference order.
2017-09-29 11:22:38 +02:00
conorbroderick
5597a76ad4 Added confirmation dialog when expiring silences 2017-09-14 16:41:55 +01:00
Pierre Awaragi
f3cd3978db added email notification text content support (#934)
* added email notification text content support (configuration text)
added default email notification text content default value empty
converted email notification from html to multipart/alternatives with support to both html (first) and text (last)
ignore intellij IDE .idea working folder

* removed specific editor .gitignore entries

* renamed TEXT to Text as it's not an acronym
added TODO note to refactor multipart code to use standard go library

* refactored to use standard go mime/multipart library for text and html parts and bounderies

* use multipart createPart returned writer
added error handling while creating parts
removed unnecessary quotes from boundry string

* removed unnecessary comments
2017-09-07 17:24:19 +02:00
9to6
e1b2bfe497 When I notify alert to slack, I want to use this option. (#912)
* add link_names attribute to slack notifier

* changed type of slack option `link_names` to boolean
2017-07-25 09:21:33 +02:00
ideaship
a566036015 Support for custom SMTP hello string (#892)
* Support for custom SMTP hello string

Some MTAs insist that they be greeted with a fully qualified domain
name. The default provided by the net/smtp library, "HELLO localhost",
is not sufficient and will result in rejected messages.

This changeset adds a new configuration option that allows the
alertmanager to do its job in such an environment.

* Test SMTPHello parsing
2017-07-18 09:32:57 +02:00
Paul Traylor
dfbac123db Add User-Agent for webhook requests (#893) 2017-07-11 11:22:13 +02:00
Siavash Safi
d5f0d1773f Add entity_display_name for VictorOps, use better state_message (#769)
* Add entity_display_name for VictorOps, use better state_message

* Reuse existing long-form templates for state_message

* Rebuild binaries

* Limit state_message to 20K
2017-07-03 11:44:53 +02:00
Praveen Maurya
525bd56db0 Changes to send mail to smtp port 465 (#704) 2017-06-18 12:18:10 +02:00
Max Inden
a217e162a8 Do not expose resolved alerts & do not send resolved if never firing (#820)
Do not expose resolved alerts on the /alerts endpoint. Do not send
resolved alerts to receivers if the alerts have never been fired before.
2017-05-29 14:07:05 +02:00
Fabian Reinartz
d73a655bf4 Simplify silence modifications, add update endpoint (#796)
* Simplify silence modifications, add update endpoint

* vendor: add pkg/errors

* ui: Handle upserting of silences

.

* Regenerate bindata
2017-05-16 16:48:25 +02:00
Frederic Branczyk
cec7341ce7 Merge pull request #750 from prometheus/fabxc-patch-1-1
notify: hex encode deduplication hash
2017-04-27 14:19:12 +02:00
stuart nelson
6a909abf17 Add processing status field to alert 2017-04-27 14:18:52 +02:00
Fabian Reinartz
49ceb8cc99 notify: hex encode deduplication hash 2017-04-27 13:10:43 +02:00
Fabian Reinartz
3269bc39e1 *: switch group key to matcher serialization
Turn the GroupKey into a string that is composed of the matchers if the
path in the routing tree and the grouping labels.
Only hash it at the very end to ensure we don't exceed size limits of
integration APIs.
2017-04-21 12:06:23 +02:00
Fabian Reinartz
b1486ca546 silence: move to gogoproto
This generates the protobuf Go code with gogoproto and switches to
standard library time types.
2017-04-18 12:47:42 +02:00
Fabian Reinartz
4258b028d6 nflog: switch to gogoproto
This switches the nflog to generate Go code via gogoproto and thereby
use standard library timestamp types.
2017-04-18 10:03:57 +02:00
Fabian Reinartz
8820ce7827 Merge pull request #703 from prometheus/fix-resolve
Fix resolve notifications
2017-04-17 14:19:04 +02:00
Fabian Reinartz
309c6af4b2
nflog: use alert set instead of hash for deduplication
Building a hash over an entire set of alerts causes problems, because
the hash differs, on any change, whereas we only want to send
notifications if the alert and it's state have changed. Therefore this
introduces a list of alerts that are active and a list of alerts that
are resolved. If the currently active alerts of a group are a subset of
the ones that have been notified about before then they are
deduplicated. The resolved notifications work the same way, with a
separate list of resolved notifications that have already been sent.
2017-04-13 15:13:47 +02:00
Julius Volz
7f1d111324 Include notifier type in retry logs and errors 2017-04-11 00:55:14 +02:00
Conor Broderick
b7bea3df5c Renamed from and message options for VictorOps to monitoring_tool and state_message as per the VictorOps documentation (#667) 2017-03-24 14:06:39 +00:00
Frederic Branczyk
c392ace697
notify: replace unfiltered with filtered alerts 2017-01-04 13:50:40 +01:00
Frederic Branczyk
dcf2b3afcb
notify: move resolved alert filtering to integration
Resolved alerts, even when filtered, have to end up in the
SetNotifiesStage, otherwise when an alert fires again it is ambiguous
whether it was resolved in between or not.

fixes #523
2016-10-05 17:45:35 +02:00
sgissi
96a428a55e config/notify: Add SMTP Require TLS global option (#512) 2016-09-27 11:00:21 +02:00