Commit Graph

2435 Commits

Author SHA1 Message Date
Julien Pivotto
75932c7e40
Merge pull request #2658 from roidelapluie/updategodeps
Update go dependencies & switch to go-kit/log
2021-08-02 23:51:33 +02:00
Julien Pivotto
b2a4cacb95 Update go dependencies & switch to go-kit/log
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-08-02 12:43:23 +02:00
Julien Pivotto
3d86bd709d
Merge pull request #2648 from benridley/bugfix_mutetime_utc
Ensure time interval comparisons are in UTC
2021-07-26 13:03:22 +02:00
Julien Pivotto
010c683e4e
Merge pull request #2615 from treid314/sns-reciever
Add AWS SNS receiver
2021-07-26 10:30:08 +02:00
Ben Ridley
a1136942bb Fix typo in label to help debugging (again)
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-07-13 13:49:30 +10:00
Ben Ridley
01287a4b6d Fix test case not being included in mute count
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-07-13 13:48:16 +10:00
Ben Ridley
c70481f71f Fix minor timezone typo to help debugging.
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-07-13 10:33:37 +10:00
Ben Ridley
4ccbbaef20 Ensure time interval comparisons are in UTC
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-07-13 10:27:13 +10:00
Tyler Reid
a1260af1c3 Break notify into submethods to create the session then create the publish input to send. Check we populate a region for all requests.
This reverts commit 4c2a5f156c.

Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-07-09 10:53:35 -05:00
Tyler Reid
51b93681b2 Revert "Add sigv4 as a global config option"
This reverts commit 4c2a5f156c.

Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-07-09 09:33:05 -05:00
Tyler Reid
4c2a5f156c Add sigv4 as a global config option
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-07-07 18:45:58 -05:00
Tyler Reid
7ecb6bcb22 Check Error in unit test and clean up docs
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-07-06 18:17:40 -05:00
Tyler Reid
077b20dd9a Add error check when creating sns session
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-07-01 09:19:25 -05:00
Julien Pivotto
8491f81629
Merge pull request #2635 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-06-28 13:15:58 +02:00
Tyler Reid
1322abdc08 Remove unused checkTopicFifoAttribute function
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-27 21:02:20 -05:00
Tyler Reid
208bed6dee Update config docs to clarify fifo SNS deduplication strategy. Remove extra api call get topic attributes and use '.fifo' strategy instead
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-27 20:26:44 -05:00
prombot
779af9c4eb Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-06-27 00:01:33 +00:00
Tyler Reid
25e6d4efd9 Add common/sigv4 with the sigv4 config
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-23 10:54:32 -05:00
Björn Rabenstein
fd0929ba9f
Merge pull request #2627 from prometheus/release-0.22
Merge release branch back into master
2021-06-23 13:41:56 +02:00
Julien Pivotto
e3fb99cc2d
Rename default branch to main (#2501)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-23 10:06:52 +01:00
Bartlomiej Plotka
02346e4e49
matchers: Parse Matcher now expects consistent enclosing with quotes. (#2632)
Fixes https://github.com/prometheus/alertmanager/issues/2630

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2021-06-23 10:05:49 +01:00
Tyler Reid
bd82f70bc2 Fix spacing for client config
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-22 14:44:33 -05:00
Tyler Reid
30a83f7bf7 Use supplied user creds when creating an STS client
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-22 14:43:41 -05:00
Björn Rabenstein
29fcb0b7fb
Merge pull request #2613 from fpetkovski/improve-alertmanager-members-inconsistent-alert
Improve the AlertmanagerMembersInconsistent alert
2021-06-22 14:47:03 +02:00
fpetkovski
b408b522bc Improve the AlertmanagerMembersInconsistent alert
The expression alertmanager_cluster_members{job="alertmanager"}[5m]) is assumed to return
one series for each alertmanager instance in the cluster. When running inside Kubernetes,
alertmanager pods can get evicted and rescheduled. This can change the instance label and
produce a new series for that alertmanager instance.

When the same pod gets evicted several times in a row, there will be a short interval in which
Prometheus will return values from both the new series and the old series.
As a result, counting the number of series for the alertmanager_cluster_members metric
will overestimate the number of instances in the given cluster.

This commit modifies the the AlertmanagerMembersInconsistent alert to increase the for clause to 15m
in order to reduce the probability of a false positive.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-06-22 08:21:02 +02:00
Tyler Reid
9ff4ac3301 Create new session if needed to get STS Creds
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-21 13:41:53 -05:00
Tyler Reid
dfb4d1fba1 Fix linter error
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-21 12:32:36 -05:00
Tyler Reid
8911051770 Make API URL optional, clear up credential logic
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-21 12:29:03 -05:00
Tyler Reid
4ebcaf9c23 Merge remote-tracking branch 'upstream/master' into sns-reciever 2021-06-17 18:05:11 -05:00
Tyler Reid
63f9082ec4 Fix docs spacing
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-17 10:45:27 -05:00
Tyler Reid
b9b53f172d Code review fixes
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-17 08:55:27 -05:00
Tyler Reid
d4ff90b555 Add missing template for aws region
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 16:42:55 -05:00
Tyler Reid
a56305a3c0 Fix spacing from removing default api version
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 14:41:30 -05:00
Tyler Reid
3446b35272 Code review fixes: copy attributes, truncate all the messages, fix logging, remove api_version
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 14:27:19 -05:00
Tyler Reid
9d37d6cc44 More gofmt fixes
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 09:56:55 -05:00
Tyler Reid
756cddad9c Fix for golangci-lint warning
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 09:38:18 -05:00
Tyler Reid
6ada9a634d Cache fifo bool in the notifier
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-16 09:31:23 -05:00
Marco Pracucci
3a63cc2835
Updated assets
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2021-06-16 15:55:28 +02:00
Tyler Reid
c48b54bdf8 Fix gosmpl linter issues
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 19:07:19 -05:00
Tyler Reid
889fa96439 Remove isFifoTopic test
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 18:18:19 -05:00
Tyler Reid
8d3b1b5896 Add config docs
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 18:03:15 -05:00
Tyler Reid
b509a5bdbb Add subject template for subject field. Better check for supplied creds, use GetTopicAttributes to check fifo
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 17:24:52 -05:00
Tyler Reid
68fa1bf19f Add string length check to fifo check
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 09:46:07 -05:00
Tyler Reid
af8406a920 Check error type before unpacking awserr.requestFailure
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-15 09:09:01 -05:00
Tyler Reid
6519c399b1 Add some tests for sns receiver
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-14 22:14:12 -05:00
Tyler Reid
72d63a5d72 Remove isFifo config option; use template strings; use retier; other code review comments
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-14 18:28:57 -05:00
Tyler Reid
009f8b17e9 Use 1024 rather than 1000 for KB size, fix target arn, handle large SMS messages correctly
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-14 10:21:33 -05:00
Björn Rabenstein
58169c1412
Merge pull request #2614 from 9er/docs-weeekday-typo
Docs: Fixed typo 'weeekday_range'
2021-06-14 14:48:20 +02:00
Tyler Reid
74d15273c0 Add support for role arn, truncation, dedupe key and env auth
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-11 16:21:15 -05:00
Tyler Reid
5dcf4f5f91 ARN Auth start
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
2021-06-11 10:30:44 -05:00