Commit Graph

1050 Commits

Author SHA1 Message Date
stuart nelson
6a909abf17 Add processing status field to alert 2017-04-27 14:18:52 +02: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
stuart nelson
24a9a64bdf Only find MAC address if no command-line flag value given (#638)
* Find MAC address if mesh.hardware-addr not given

Defaulting to the machine's MAC address fails
sometimes fails and causes a panic. Allow the user
to specify custom address to skip this so they can
run AlertManager.

* -mesh.hardware-address -> -mesh.peer-id

* Fix command-line invocation
2017-02-28 14:57:45 +01:00
stuart nelson
0ecc59076c Add DELETE to acceptable cors methods 2017-02-22 13:55:57 +01:00
Björn Rabenstein
c38bf35abb Merge pull request #631 from prometheus/beorn7/meta
Remove AUTHORS.md and add MAINTAINERS.md
2017-02-21 15:25:15 +01:00
beorn7
6996050303 Remove AUTHORS.md and add MAINTAINERS.md
This implements the suggestion to name Stuart as the maintainer for
now. We can later revisit if this is a solution that works and is
sustainable for everyone involved.
2017-02-21 14:21:00 +01:00
Fabian Reinartz
b5af749423 Merge pull request #607 from mattbostock/prevent_panic
Prevent panic on failed config load
2017-01-17 16:19:37 +01:00
Matt Bostock
890f148a27 Prevent panic on failed config load
Prevent Alertmanager from panicking when the configuration cannot be
loaded.

Spotted in version 0.4.2:

    INFO[0000] Starting alertmanager (version=0.4.2, branch=HEAD, revision=9a5ab2fa63dd7951f4f202b0846d4f4d8e9615b0)  source=main.go:84
    INFO[0000] Build context (go=go1.7.3, user=root@45f28166fed1, date=20170117-13:50:50)  source=main.go:85
    INFO[0000] Loading configuration file                    file=alertmanager.yml source=main.go:156
    ERRO[0000] error: yaml: line 64: could not find expected ':'  source=api.go:115
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x401adb]

    goroutine 1 [running]:
    panic(0x83e240, 0xc42000e020)
            /usr/local/go/src/runtime/panic.go:500 +0x1a1
    main.(*API).Update(0xc4200b20f0, 0xc42019f800, 0x17e7, 0x45d964b800)
            /go/src/github.com/prometheus/alertmanager/api.go:117 +0xcb
    main.main.func3(0x0, 0x0)
            /go/src/github.com/prometheus/alertmanager/main.go:172 +0x226
    main.main()
            /go/src/github.com/prometheus/alertmanager/main.go:192 +0x97a
    make: *** [run] Error 2
2017-01-17 14:59:11 +00:00
devnev
f2ba86e9d2 Add proper JSON marshaling of config regexps. (#602) 2017-01-17 11:50:54 +01:00
Martín Ferrari
5489644cbe Wait for test server to be ready before running tests (#605)
* Wait for test server to be ready before running tests

This fixes problems when running the acceptance tests in slow or CPU-starved
machines, as mentioned in #472.
2017-01-16 12:32:27 +00:00
Fabian Reinartz
45bd4fd3e5 Merge pull request #595 from brancz/fix-send-resolved
notify: replace unfiltered with filtered alerts
2017-01-09 11:55:33 +01:00
Frederic Branczyk
c392ace697
notify: replace unfiltered with filtered alerts 2017-01-04 13:50:40 +01:00
Fabian Reinartz
cb4260d4b7 Merge pull request #593 from alicebob/favicon
Add a favicon
2017-01-04 10:15:41 +01:00
Harmen
be74c8442c make assets format 2017-01-03 19:44:04 +01:00
Harmen
0a3fed86ae add a favicon 2017-01-03 19:41:34 +01:00
Fabian Reinartz
41614b1592 Merge pull request #572 from prometheus/vendor
vendoring: update
2016-12-12 17:12:54 +01:00
Fabian Reinartz
32f28d8c33 Merge pull request #576 from soupdiver/add_groupkey_to_alertgroups_api_endpoint
add groupKey to alerts/groups API endpoint
2016-12-07 14:10:44 +01:00
Felix
9fcdb47faa add GroupKey() to aggrGroup, add it to alerts/groups and use the function for context initialization 2016-12-07 11:05:11 +08:00
Fabian Reinartz
a2666e6b31 vendoring: update 2016-12-01 13:49:28 +01:00
Fabian Reinartz
1fd0950d48 Merge pull request #570 from prometheus/travis
travis: update Go compiler version
2016-11-25 13:50:51 +01:00
Fabian Reinartz
e4a7acc7f6 travis: update Go compiler version 2016-11-25 13:31:13 +01:00