27 Commits

Author SHA1 Message Date
ac09baae7d Chore: Use Header.Set method instead of Header.Add (#29804)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-14 15:13:01 +01:00
d796c61946 Security: Fixes minor security issue with alert notification webhooks that allowed GET & DELETE requests #29330 2020-11-24 10:42:54 +01:00
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
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
a86b8c8a04 http: remove dualstack since its deprecated (#16940)
Deprecated: Fast Fallback is enabled by default. To
disable, set FallbackDelay to a negative value.

https://golang.org/src/net/dial.go
2019-05-08 10:37:48 +02:00
110ffb69de Fix bug tls renegociation problem in Notification channel (webhook) #14800 2019-01-13 21:42:33 +01:00
24636da800 closes the body properly on successful webhooks
this commit also adds a test docker container
for receiving alerting web hook requests
2018-12-27 16:08:13 +01:00
e5e8b9800c merge: fixed conflicts in discord PR 2018-05-07 15:40:43 +02:00
df71fe33fd refactor: refactoring notification service to use new service registry hooks 2018-04-27 14:15:17 +02:00
c1742df9ac remove unused variables detected by varcheck 2018-04-18 19:04:37 +02:00
30f048965c Merge branch 'master' into feature/discord 2018-04-08 20:09:56 +02:00
9a4ae30227 Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
1bf982439b Sending image 2017-03-23 21:53:54 +01:00
412b8998a8 webhooks: get proxy settings from ini file
closes #7710
2017-03-02 13:57:28 +01:00
05952688c5 tech: avoid using http.DefaultClient 2017-02-24 17:22:12 +01:00
03354bc49a tech: replace context.TODO with background ctx 2017-02-24 09:20:28 +01:00
f5d8a75381 tech(webhook): remove redundant if statement 2017-01-19 09:29:40 +01:00
376d2d56bf (feature) add LINE notify to notifier 2017-01-19 17:26:53 +09:00
b81e97c99c webhook: adds json content-type
closes #6822
2016-12-05 10:46:04 +01:00
d1eceedf55 feat(webhook): add httpmethod to webhook
closes #6255
2016-10-18 16:50:16 +02:00
c38f6ff182 Make alerting notifcations sync (#6158)
* tech(routines): move the async logic from notification to alerting notifier

* tech(notification): reduce code dupe

* fix(notification): dont touch the response unless its an error

* feat(alerting): make alerting exeuction async but flow sync

* tech(alerting): remove commented code

* tech(alerting): remove unused code

* tech(alerting): fix typo

* tech(alerting): implement Context on EvalContext

* tech(alerting): wait for all alerts to return

* feat(alerting): dont allow alert responses to cancel

* Revert "feat(alerting): dont allow alert responses to cancel"

This reverts commit 324b006c96687da18a542942f39c10c99119430c.

* feat(alerting): give alerts some time to finish before closing down
2016-10-03 09:38:03 +02:00
a49c21df3a fix(png-renderer): increase timeouts 2016-09-22 19:24:18 +02:00
d6fdb598b0 fix(alerting): gofmt 2016-08-08 14:46:47 +02:00
ae5f8a76d9 feat(alerting): lots of progress on notifications, refactored them out to their own package, restored webhook notitication and added slack notification 2016-07-27 12:09:55 +02:00
72e23bca5f tech(alerting): improve/cleanup logging 2016-06-16 08:56:19 +02:00
2e809cae05 tech(alerting): enforce POST for webhooks 2016-06-16 08:16:16 +02:00
efea3bc9cb feat(alerting): skeleton commit for webhook 2016-06-16 08:16:16 +02:00