Commit Graph

287 Commits

Author SHA1 Message Date
Mitsuhiro Tanda
92767f00e0
Alerting: Store sensitive settings encrypted for pagerduty notifier (#26319)
Store pagerduty integration key in secure setting.

Ref #25967
2020-07-16 10:53:35 +02:00
Marcus Efraimsson
c91e5adfcc
Alerting: Don't encrypt username for webhook notifier (#26170)
Can be hard for users to understand what user is configured
when encrypting the username field why this reverts to
store the username in cleartext.
Also, we don't encrypt username for data sources.

Ref #25967
2020-07-08 19:13:59 +02:00
Marcus Efraimsson
3223d4b419
Alerting: Store sensitive settings encrypted for webhook notifier (#26164)
Store sensitive settings (username and password) encrypted for webhook notifier.

Ref #25967
2020-07-08 17:46:34 +02:00
Mitsuhiro Tanda
292c985b76
Alerting: Support storing sensitive notifier settings securely/encrypted (#25114)
Support storing sensitive notification settings securely/encrypted.
Move slack notifier url and api token to secure settings.
Migrating slack notifier to store token and url encrypted is currently 
a manual process by saving an existing slack alert notification channel.
saving an existing slack alert notification channel will reset the stored 
non-secure url and token.

Closes #25113
Ref #25967

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-07-08 10:17:05 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Peter Holmberg
6465b2f0a3
Migration: Migrate New notification channel page (#25265)
* creating page

* add types select

* adding switches

* start with converting angular templates to json

* converting more alert channels to new format

* convert remaining channels

* typing the form

* add validation, update models

* fix default value in type select

* fix type

* fix issue with validation rule

* add missing settings

* fix type errors

* test notification

* add comments to structs

* fix selectable value and minor things on each channel

* More typings

* fix strictnull

* rename ModelValue -> PropertyName

* rename show -> showWhen

* add enums and adding comments

* fix comment

* break out channel options to component

* use try catch

* adding default case to OptionElement if element not supported
2020-06-29 13:39:12 +02:00
Mitsuhiro Tanda
9f82cd4713
Slack: Support use of chat.postMessage (#25818)
* set bearer token if token is provided
* update slack notification document

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-26 20:47:06 +02:00
Josh Soref
e4fcc39e55
Chore: spelling in Go code (#24433) 2020-06-02 14:42:34 +02:00
Arve Knudsen
07582a8e85
Chore: Fix various spelling errors in back-end code (#25241)
* Chore: Fix various spelling errors in back-end code
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
2020-06-01 17:11:25 +02:00
Andrew Burian
a0e5f51d05
Alerting: Remove message from PagerDuty summary field (#24813)
closes #16930
2020-05-25 21:01:29 +02:00
Victor Coutellier
3a0f2dc160
Alerting: Adds support for multiple URLs in Alertmanager notifier (#24196)
* Alerting: Adds support for multiple URLs in Alertmanager notifier

Adds support for multiple URLs in Alertmanager notifier following
alertmanager documentation for high availability setup.
Update the documentation for alertmanager notifier.

Closes #24195

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: bergquist <carl.bergquist@gmail.com>
2020-05-20 08:49:53 +02:00
Rob Russo
9fa551cc32
Alerting: updating the victorops alerter to handle the no_data alert type (#23761) 2020-05-19 09:58:57 +02:00
Mario Trangoni
5116420e9a
Fix misspell issues (#23905)
* Fix misspell issues

See,
$ golangci-lint run --timeout 10m --disable-all -E misspell ./...

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* Fix codespell issues

See,
$ codespell -S './.git*' -L 'uint,thru,pres,unknwon,serie,referer,uptodate,durationm'

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* ci please?

* non-empty commit - ci?

* Trigger build

Co-authored-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2020-04-29 21:37:21 +02:00
Carl Bergquist
46fd7c094b
Alertmanager: Basic auth should not be required (#23691) 2020-04-20 11:19:31 +02:00
Carl Bergquist
9652a1410b
Build: Stricter linting should break the build (#23606) 2020-04-16 16:09:27 +02:00
Hugo Häggmark
2661054fe8
Hangouts: fixes notifications for alerts with empty message (#23559)
* Hangouts: fixes notifications for alerts with empty message

* Update pkg/services/alerting/notifiers/googlechat.go

Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-04-14 15:02:58 +02:00
melchiormoulin
1814dc5afc
Alertmanager: Adds support for basic auth (#23231)
Add basicauth username and password to the alertmanager notifier UI
2020-04-01 09:29:28 +02:00
Marcus Efraimsson
6bd7411f04
Alerting: Only include image in notifier when enabled (#23194)
Fixes a bug when you had multiple notifiers for a rule, but not all 
had enabled to include image.

Fixes #22883
2020-03-31 00:46:01 +02:00
Andrew Burian
7d9b6a0dee
Alerting: Enable Alert rule tags to override PagerDuty Severity setting (#22736) 2020-03-23 19:32:55 +01:00
Carl Bergquist
b1e112923b
aligns the severity dropdown with other fields (#22779) 2020-03-13 14:19:35 +01:00
Arve Knudsen
bf908424a7
Alerting: Don't include image_url field with Slack message if empty (#22372) 2020-02-21 15:43:54 +01:00
Arve Knudsen
019834ae12
Alerting: Update the types of recipient supported by the Slack notifier (#22205)
* Alerting: Update types of supported Slack recipients
* Document Slack recipient requirements
2020-02-14 17:11:23 +01:00
Arve Knudsen
6f09bc9fb4
Fix mentioning Slack users/groups (#21734)
* alerting/slack: Allow mentioning users, groups, and channels separately
2020-02-11 21:43:28 +01:00
John Dyer
0fcb2d0b2f Alerting: Support passing tags to Pagerduty and allow notification on specific event categories (#21335)
Add support for passing tags to Pagerduty and allow notification 
on specific event categories such as Class, Group and Component.

Ref #19912, #19913

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-01-23 13:20:07 +01:00
zabullet
bcac76f5d4 Alerting: Enable setting of OpsGenie priority via a tag (#21298)
OpsGenie's model works heavily off of the priority of an alert, 
e.g. routing and escalation. Currently this plugin only supports 
the default "P3".
Setting a tag og_priority to the correct P-value, e.g. P1, P2, P3, 
P4 or P5, will call the OpsGenie API with the correct priority value 
set.
2020-01-13 21:04:24 +01:00
Alvaro Olmedo Rodriguez
abc806e17b Alerting: fallbackText added to Google Chat notifier (#21464)
Add fallbackText to Google Chat notifications. 
Definition of fallbackText: A plain-text description of the message's 
cards, used when the actual cards cannot be displayed, 
e.g. mobile notifications.

Fixes #21463
2020-01-13 20:42:52 +01:00
Marcus Efraimsson
0f0772b629
Alerting: Adds support for sending a single email to all recipients in notification channel (#21091)
When an alert is sent by e-mail, the process sends an e-mail to 
each recipient separately. This PR is a single delivery to all recipients.
For companies that use e-mail extensively, this is necessary in order 
not to overload the sending queue.

Replaces #18013
Fixes #12650

Co-authored-by: Henrique Oliveira <holiiveira@users.noreply.github.com>
2020-01-10 16:06:33 +01:00
Danilo Bargen
8a02fa7691 ThreemaNotifier: Use fully qualified status emoji (#21305) 2020-01-10 16:00:20 +01:00
Zach Bagnall
d0360de8f1 Alerting: Add configurable severity support for PagerDuty notifier (#19425)
* Pagerduty notifier: configurable severity

Instead of hardcoding `critical` make it configurable per notification channel instance.

* fix html

* Add a test to ensure default severity is correct

* Notifications doc

* Add a non-default test

* Add err check on NewJson (all tests)

* Add default severity (critical) to AlertNotificationEditCtrl class
2019-12-24 09:32:05 +02:00
michael-az
5b3ff90377 Alerting: Add more information to webhook notifications (#20420)
Adds the orgId, dashboardId and panelId of the Webhook alert notifier.
2019-12-18 14:03:59 +01:00
Christoph
8c089b98b3 PagerDuty: Fix custom_details to be a JSON object instead of a string (#21150) 2019-12-18 11:42:25 +02:00
csyangchen
34299a1bd2 Alerting: Fix panic in dingding notifier (#20378)
dingding notifier fails to send alert messages containing JSON, 
This change use map and json.Marshal to always produce valid 
JSON body.

Fixes #9771
2019-12-11 17:01:01 +01:00
Dima Ryskin
2027e1aaee AlertNotifier: Support alert tags in OpsGenie notifier (#20810)
* support alert tags in OpsGenie notifier

* update readme: OpsGenie alert tags support

* lintfix: remove redundant string formatting
2019-12-03 11:54:37 +01:00
Marcus Efraimsson
5b42bb58f6
Telegram: Check error before adding defer close of image (#20331)
Properly handles file opening error and returns before deferring 
close of file.

Fixes #20156
2019-11-13 13:33:03 +01:00
stratomonitor
4d7d13175c Alerting: Add alert_state to the kafka message Fixes #11401 (#20099)
* Notifications: Add alert_state to the kafka message Fixes #11401
2019-11-07 14:08:58 +02:00
Arve Knudsen
2a78d2a61c
pkg/services: Check errors (#19712)
* pkg/services: Check errors
* pkg/services: Don't treat context.Canceled|context.DeadlineExceeded as error
2019-10-22 14:08:18 +02:00
Andrew Rabert
8a991244d5 Alerting: Truncate PagerDuty summary when greater than 1024 characters (#18730)
Requests to PagerDuty fail with an HTTP 400 if the `summary` 
attribute contains more than 1024 characters, this fixes this.
API spec:
https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2

Fixes #18727
2019-09-20 10:39:27 +02:00
Sofia Papagiannaki
388d3d3714
Notification is sent when state changes from no_data to ok (#18920) 2019-09-05 18:54:27 +03:00
Oleg Gaidarenko
35b74a99a8
Emails: resurrect template notification (#18686)
* Emails: resurrect template notification

* Phantomjs (oh yeah, there is another dev dep phantom :-) was failing for
  the generation of the html templates so I had to update the dependencies
  in order to fix it. While doing that I update the scripts field and docs
  for it as well. yarn.lock is included

* Move splitting of the emails to separate helper function, since more services
  coming up that would need to use this functionality

* Add support for enterprise specific email letters. Probably could
  be done in the better way, but it's not a priority right now
2019-08-26 17:19:03 +02:00
Dominic Miglar
32d6740b8f Alerting: Also include configured AlertRuleTags in Webhooks (#18233)
* added alert rule tags in webhook notifications

* fix: don't include whole list of Tag objects but only key/value pairs in Webhook JSON

* marked webhook alerts to support alert rule tags
2019-08-03 17:00:40 +02:00
Oleg Gaidarenko
caa1314f44
Build: use golangci-lint as a make command (#17739)
* Build: use golangci-lint as a make command

* Since gometalinter was deprecated in favor of golangci-lint so it was
  replaced by it. Responsibilities held by the gometalinter was moved to
  golangci-lint

* There was some changes in implementation (that was also mentioned in
  the code comment) between the tools, which uncovered couple errors
  in the code. Those issues were either solved or disabled by
  the inline comments

* Introduce the golangci-lint config, to make their
  configuration more manageable

* Build: replace backend-lint.sh script with make
2019-07-02 16:06:59 +03:00
Thibault Chataigner
e06abb30aa Alerting: Add tags to alert rules (#10989)
Ref #6552
2019-06-06 13:29:30 +02:00
Mario Trangoni
87760d4fde Codestyle: Fix govet issues (#17178)
ref #10381

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-06-04 22:00:05 +02:00
Carl Bergquist
d8736a2547
Alerting: golint fixes for alerting (#17246) 2019-06-03 10:25:58 +02:00
Abhilash Gnan
ca6151e23f Alerting: Support for configuring content field for Discord alert notifier (#17017) 2019-05-23 08:31:02 +02:00
Mario Trangoni
66ba2aa524 Fix gosimple issues (#17179)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-05-21 07:50:44 +02:00
Carl Bergquist
bfa7c3d963
alerting: golint fixes for alert notifiers. (#17167) 2019-05-20 15:23:06 +02:00
Carl Bergquist
2904e2d9fe
Alertmanager: Replace illegal chars with underscore in label names (#17002)
closes #16624
2019-05-16 11:41:57 +02:00
Carl Bergquist
13f137a17d
tech: avoid alias for importing models in alerting (#17041)
ref #14679
2019-05-14 08:15:05 +02:00
zhulongcheng
2fff8f77dc move log package to /infra (#17023)
ref #14679

Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00