Commit Graph

1867 Commits

Author SHA1 Message Date
prombot
702dd33416 makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-04-12 00:00:29 +00:00
Max Inden
36ffb6ee71
Merge pull request #1811 from simonpasquier/dependabot/go_modules/github.com/hashicorp/go-sockaddr-1.0.2
Dependabot/go modules/GitHub.com/hashicorp/go sockaddr 1.0.2
2019-04-11 18:41:56 +02:00
Simon Pasquier
1c0b8e4139 notify: redact more secret data from logs (#1825)
Follow-up of #1822

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-04 18:27:13 +02:00
stuart nelson
e2baff8d6e
Merge pull request #1822 from simonpasquier/redact-slack-url
notify: redact Slack webhook URL from logs
2019-04-03 18:33:05 +02:00
Simon Pasquier
0edf8bef44 notify: redact Slack webhook URL from logs
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-03 17:44:32 +02:00
stuart nelson
6ede51d921
Merge pull request #1821 from simonpasquier/distinct-log-levels-on-cancel
*: log at debug level when context is canceled
2019-04-03 17:23:55 +02:00
Simon Pasquier
a5e26cc721 *: log at debug level when context is canceled
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-03 16:41:03 +02:00
Max Inden
a36bc1bb8d
Merge pull request #1817 from mxinden/disable-caching
ui/web: Set HTTP headers to prevent asset caching
2019-04-03 14:00:26 +02:00
stuart nelson
fa92908942
Merge pull request #1798 from pgier/amtool-cli-apiv2
cli: update amtool to use apiv2
2019-04-03 10:16:29 +02:00
Paul Gier
fab3d1e89f cli: remove duplicate import
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-04-02 09:58:01 -05:00
Paul Gier
e31cfbf365 cli: minor style improvements
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-04-01 10:50:38 -05:00
Paul Gier
3b9629e294 cli: check for NotFound error during silence import
Check the error type when there is a non-existent silence
instead of comparing the text of the error message.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 10:02:39 -05:00
Paul Gier
52f78c5b88 cli: add note to changelog related to amtool update
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 09:11:09 -05:00
Paul Gier
ab4784b112 cli: style improvement and fix filter handling
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 09:11:09 -05:00
Paul Gier
6561774f9e cli: fix some command output formatting
- remove brackets around silence ID when adding new silence
- fix simple formatting of show config

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 09:11:09 -05:00
Paul Gier
2d483fac88 minor godoc improvements
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 09:11:09 -05:00
Paul Gier
74fa2236f7 cli: update amtool to use apiv2
Includes godoc improvements

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 09:11:09 -05:00
Paul Gier
89b0ff0574 api/v2: Respond with 404 when silence ID is not found (#1816)
When the client attempts to update a silence with a non-existent
ID, respond with a 404 (Not Found) instead of a 400 (Bad Request).

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 12:29:00 +01:00
Simon Pasquier
0f754cdef3 config: fix Wechat global parameters (#1813)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-29 12:21:59 +01:00
Max Leonard Inden
b1f05ce988
ui/web: Set HTTP headers to prevent asset caching
This patch adds HTTP headers to each web asset response, disabling
caching for the payload. This prevents users running an old version of
the UI against a new version of Alertmanager once they updated. On the
down-side it increases page load size on subsequent page loads.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-03-29 09:33:20 +01:00
Max Inden
19ab388d93
Merge pull request #1800 from metalmatze/sort-peers
Sort peers before returning via API
2019-03-29 08:54:16 +01:00
stuart nelson
a94088406a
Merge pull request #1812 from simonpasquier/refactor-pg-error
notify: rework handling of PagerDuty responses
2019-03-26 13:50:17 +01:00
Simon Pasquier
f0763e2047 notify: rework handling of PagerDuty responses
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-26 11:49:43 +01:00
stuart nelson
c88121f0ae
Merge pull request #1799 from yasongxu/fix-golint
fix golint error
2019-03-25 17:07:26 +01:00
stuart nelson
5b09060431
Merge pull request #1802 from simonpasquier/remove-bzr
Makefile: remove bzr check
2019-03-25 16:18:30 +01:00
Simon Pasquier
bf43f5b7c2 Update vendor/
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-22 17:09:56 +01:00
Simon Pasquier
ad71e1c0f3 Makefile: remove bzr check
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-18 09:55:12 +01:00
Matthias Loibl
70dde48f5c
Sort peers before returning via API
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2019-03-15 14:58:14 +01:00
xuyasong
60c9bf49c2 fix golint error
Signed-off-by: xuyasong <1154564309@qq.com>
2019-03-15 18:10:36 +08:00
Panayiotis
f40ecee773 api/v1: Add POST as an allowed CORS request method (#1796)
Signed-off-by: xdrop <xdrop.me@gmail.com>
2019-03-14 12:14:22 +01:00
Simon Pasquier
60164f903d notify: add email integration tests (#1787)
Run email notifier tests against a maildev instance.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-13 11:12:01 +01:00
Karsten Weiss
93671add46 config/notifiers.go: Fix bad syntax for struct tag value (#1794)
This fixes the following error found by go vet:

config/notifiers.go:546:2: struct field tag
`yaml:"url_title,omitempty" json:"url_title,omitempty` not compatible with
reflect.StructTag.Get: bad syntax for struct tag value (govet)
	URLTitle string   `yaml:"url_title,omitempty" json:"url_title,omitempty`
	^

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2019-03-13 11:09:58 +01:00
Paul Gier
8688c7b9ad api/v2: move generated client code from test to api/v2 (#1792)
- Move the generated api/v2 client code out of the test directory
and into the api/v2 directory with models and restapi.
- Remove duplicate models directory
- Update tests to use api/v2 package for models and client

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-12 17:11:23 +01:00
Karsten Weiss
c637ca1a6e Fix typos in comments and metric HELPs (#1790)
No functional change.

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2019-03-12 10:29:26 +01:00
stuart nelson
c0a7c07236
Merge pull request #1779 from pgier/makefile-update
update Makefile.common and license headers
2019-03-11 21:55:07 +01:00
Paul Gier
c834a991c6 set ELM_HOME for the elm-env container
The ELM_HOME variable needs to be set to the mounted volume
directory when building to prevent permissions errors caused
by using root as the default home dir.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 10:45:45 -05:00
Paul Gier
458f1d646b Makefile improvements
- make clean shouldn't print errors when files/directories have already
been removed
- add copyright header to generated api files to pass license check

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 10:45:45 -05:00
Paul Gier
538305bec9 update Makefile.common and license headers
Sync Makefile.common to latest which updates promu version
and adds license check to default target.
Add missing license headers.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 10:39:31 -05:00
Paul Gier
3ffe6cfdc8 api/v2: sort silences similarly to v1 api (#1786)
* api/v2: sort silences similarly to v1 api

Sort the queried silences to match behaviour in the v1 api.

Sort silences in-place instead of creating multiple slices.
Use separate function for sorting silences for easier testing.
Add unit test for sort order.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-11 14:19:52 +01:00
dependabot[bot]
8a74670ce6
Bump github.com/hashicorp/go-sockaddr from 1.0.0 to 1.0.2
Bumps [github.com/hashicorp/go-sockaddr](https://github.com/hashicorp/go-sockaddr) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/hashicorp/go-sockaddr/releases)
- [Commits](https://github.com/hashicorp/go-sockaddr/compare/v1.0.0...v1.0.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-11 05:47:24 +00:00
stuart nelson
c5e7dca3dc
Merge pull request #1788 from simonpasquier/fix-multi-string-query-parameters
*: fix filter parameters with comma
2019-03-09 11:03:26 +01:00
Simon Pasquier
bc373f562f *: fix filter parameters with comma
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-08 09:56:05 +01:00
Max Inden
0a2d108bb9
Merge pull request #1763 from mxinden/design-secure-memberlist
doc: Add 'Secure Alertmanager cluster traffic' design document
2019-03-05 14:44:59 +01:00
stuart nelson
baa8dd7ef8
Merge pull request #1782 from simonpasquier/go-1.12
Switch to Go 1.12
2019-03-04 17:19:43 +01:00
Simon Pasquier
a4412270ef Switch to Go 1.12
It also pins errcheck to the latest stable release and simplifies how it
gets installed.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-04 16:33:32 +01:00
stuart nelson
0788670f81
Merge pull request #1780 from prometheus/fix-receiver-check
Fix receiver name checking in deep sub-routes
2019-03-04 11:11:58 +01:00
Julius Volz
3a73ca5b65 Fix receiver name checking in deep sub-routes
Fixes https://github.com/prometheus/alertmanager/issues/1759

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-03-02 12:35:09 +01:00
Max Leonard Inden
d81b9a5435
doc: Add 'Secure Alertmanager cluster traffic' design document
Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-03-01 16:12:25 +01:00
Jo Walsh
8642c0b46e Allow sending of unauthenticated SMTP requests when smtp_auth_username is not supplied (#1739)
* try a more complicated but clearer approach explicitly returning a no-auth stmp.Auth when no username is supplied in config

Signed-off-by: Jo Walsh <jowalsh@bgs.ac.uk>

* fix test to expect no error from auth if username is not supplied
Signed-off-by: Jo Walsh <jowalsh@bgs.ac.uk>

* clean up some formatting errors in surplus comments

Signed-off-by: Jo Walsh <jowalsh@bgs.ac.uk>

* keep noAuth / loginAuth functions all together

Signed-off-by: Jo Walsh <jowalsh@bgs.ac.uk>

* Address latest comments

Co-Authored-By: Jo Walsh <jowalsh@bgs.ac.uk>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-01 15:53:18 +01:00
Björn Rabenstein
a732f6dbe4
Merge pull request #1776 from prometheus/beorn7/ui
Make the silence preview show also muted alerts
2019-03-01 14:47:08 +01:00