Commit Graph

1069 Commits

Author SHA1 Message Date
Fabian Reinartz
dc5142c76b Fix broken link to silence from alert 2017-05-09 10:26:51 +02:00
Conor Broderick
a77bfb44d6 Added unit test for continue in root route error (#768)
* Added unit test for continue in root route error

* replaced %v with %q
2017-05-09 10:11:40 +02:00
Fabian Reinartz
c9163bd689 Merge pull request #748 from prymitive/anchor-rules
Anchor silence regex rules
2017-05-09 10:11:01 +02:00
Fabian Reinartz
5aff15b30f Merge pull request #773 from prometheus/fixalertstat
Fix alert status handling in UI
2017-05-09 10:09:24 +02:00
Fabian Reinartz
b9d455cb9a Merge pull request #774 from Kellel/origin/#746
Fixes #746
2017-05-09 10:08:49 +02:00
Kellen Fox
6aece86ac1 Fixes #746
Found that we are only defining MarshalJSON for the Regexp type for
references not for the direct object

Also took the time to simplify the json.Unmarshal usage in cli/config.go
2017-05-08 11:25:25 -07:00
Fabian Reinartz
8170206070 Fix alert status handling in UI 2017-05-08 12:56:03 +02:00
Fabian Reinartz
cb8b507e62 Merge pull request #760 from prymitive/fix-types-lock
Use proper locks when modifying alert status
2017-05-04 14:11:26 +02:00
Fabian Reinartz
8566c9531b Merge pull request #767 from Conorbro/continue_error_in_root_route
Throw error when continue in route root of Alertmanager config
2017-05-03 15:06:49 +02:00
conorbroderick
dc782f2dd4 Throw error when continue in route root of Alertmanager config 2017-05-03 13:40:54 +01:00
Łukasz Mierzwa
2c14247adc Fix lock usage in the types package
Locking is a bit tricky there since some state-modifying methods will call to other methods that also modify marker state, simple defer won't work.
2017-05-01 20:28:54 +01:00
Fabian Reinartz
91a2b9d717 Merge pull request #759 from prymitive/alert-status-case
Serialize AlertStatus as 'status'
2017-04-28 22:35:30 +02:00
Łukasz Mierzwa
8bc5855c87 Serialize AlertStatus as 'status'
AlertStatus doesn't have json tag with the field name, so it's serialized into 'Status', and it's the only uppercase field in the alert object. Tag it with 'status' name for consistency
2017-04-28 11:34:01 -07:00
Fabian Reinartz
5aeaf2cb98 Merge pull request #752 from prometheus/cut-0.6.1
*: cut 0.6.1
2017-04-28 11:54:43 +02:00
Frederic Branczyk
b962597d97
*: cut 0.6.1 2017-04-28 11:48:12 +02:00
Frederic Branczyk
3eb81b4243 Add config hash metric (#751) 2017-04-27 20:58:15 +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
Łukasz Mierzwa
2f4399a3e8 Anchor silence regex rules
When user creates a new silence with regex match it's left to the user to anchor it, which is not consistent with Prometheus regex handling (promql/functions.go#L818).
2017-04-26 19:10:16 -07:00
stuart nelson
fd4fd115cb Build with go-1.8 in circle-ci 2017-04-26 10:58:04 +02:00
Fabian Reinartz
2d1b5fc43f Merge pull request #738 from tomwilkie/context
Remove use of route.Context
2017-04-26 07:45:55 +02:00
Tom Wilkie
ba4fc17307 Remove use of route.Context 2017-04-25 17:43:01 -07:00
stuart nelson
762b5c479a Update VERSION and CHANGELOG.md (#735) 2017-04-25 21:44:20 +02:00
stuart nelson
98ec6632c3 Remove openbsd/arm builds (#732)
golang.org/x/sys/unix is failing for the various
arm builds.
2017-04-24 22:52:55 +02:00
stuart nelson
e9cb88e15a Fix vendor package while waiting
I can't be bothered to go through the mountain of
steps to commit this tiny change.

https://github.com/golang/go/issues/20055
2017-04-21 16:21:32 +02:00
Fabian Reinartz
c61a6ec8b6 Merge pull request #716 from prometheus/reloadtest
test: add reload test
2017-04-21 14:57:52 +02:00
Fabian Reinartz
9753a7fcc6 Merge pull request #726 from prometheus/peerpanic
cmd: fix panic on empty peer string
2017-04-21 14:57:23 +02:00
Kellen Fox
b2c656a071 Add command wrapper to handle printing errors for any subcommands (#724)
Fixes #721

I was using the RunE method of cobra.Command which does things with an
error returned from a function. I doesn't seem possible to keep it from
printing usage every time, so I've make a wrapper to use the other
function.
2017-04-21 14:50:02 +02:00
Fabian Reinartz
7e31a58868 cmd: fix panic on empty peer string 2017-04-21 14:40:46 +02:00
Fabian Reinartz
0659dfbde3 Merge pull request #725 from prometheus/groupkey
*: switch group key to matcher serialization
2017-04-21 13:21:39 +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
stuart nelson
68e1cbe024 Add mousetrap vendor package 2017-04-20 11:33:33 +02:00
stuart nelson
7429ccca99 Fix invalid json in vendor.json file 2017-04-20 11:31:04 +02:00
Kellen Fox
3aab66ec3a Amtool implementation (#636)
* Implement alertmanager cli tool 'amtool'

The primary goal of an alertmanager tool is to provide a cli interface
for the prometheus alertmanager.

My vision for this tool has two parts:
  - Silence management (query, add, delete)

  - Alert management (query, maybe more in future?)

Resolves: #567
2017-04-20 11:04:17 +02:00
Fabian Reinartz
cb8729a458 Merge pull request #715 from prometheus/gogoproto
Move to gogoproto
2017-04-18 14:12:58 +02:00
Fabian Reinartz
15efe6d748 vendor: add gogo protobuf packages 2017-04-18 12:58:32 +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
ff5ecfff51 test: add reload test
This test reloads the Alertmanager to verify, that it properly keeps
state and sends notifications correctly across reloads.
2017-04-18 12:44:38 +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
Tobias Schmidt
af8cfdde14 Create sha256 checksums file during release (#713) 2017-04-17 20:00:29 +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
0ce2de56fc Merge pull request #702 from prometheus/log-failed-notifiers
Include notifier type in retry logs and errors
2017-04-11 13:00:00 +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
stuart nelson
1e34f29532 Filter alerts (#633)
* Vendor dependencies.

This updates several old dependencies, removes
some that are no longer needed, and adds
`pkg/labels` from prometheus `dev-2.0` branch.

* Add metrics selector parsing code

This is a temporary simplified re-implementation
of promQL's metric selector parsing.

* Add alerts filtering

Filter alerts through `?filter=` query string.

* Add silences filtering

Filter silences through `?filter=` query string.

* Move `parse` to `pkg/parse`
2017-03-16 11:16:10 +01:00
Max Inden
fced9e126b api: Expose mesh status (#644)
* api: Expose mesh status

The weaveworks mesh package reveals information about the current status
of the mesh network between alertmanager instances. This commit exposes
the current address and connection status of each instance connected to
the targeted alertmanager instance via the /status API endpoint.

* api: Replace LocalConnectionStatus with PeerStatus

Now meshStatus contains all peers (Name, NickName, UID) of the network.
Additionally adding Name and Nickname of current target to toplevel of
meshNetwork object.
2017-03-07 18:17:03 +01:00
James O'Gorman
00e3b98614 template: Add reReplaceAll function (#639)
This allows for using regexp replacement in templates.
2017-03-04 12:07:31 +00:00
stuart nelson
412d33336d Update README.md (#641)
Make it more clear that -mesh.peer flag should be
repeated for each peer.
2017-03-02 12:35:04 +01:00