Commit Graph

1030 Commits

Author SHA1 Message Date
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
Fabian Reinartz 0ea1cac51e *: cut v0.5.1 (#569) 2016-11-24 17:58:45 +01:00
Fabian Reinartz fb631957ab Merge branch 'master' into release-0.5 2016-11-24 17:30:37 +01:00
Fabian Reinartz e7252270fe Update vendoring (#564)
* vendor: update prometheus/common packages

* vendor: add missing x/sys dependency

* vendor: sync with remote repos
2016-11-22 15:18:51 +01:00
Fabian Reinartz d7843ad6a6 Export parsed configuration as JSON and drop js-yaml dependency. (#563)
* Export parsed configuration as JSON in /api/v1/status.
* Avoid exporting the XXX fields.
* Drop js-yaml library and use already parsed configuration.
* Go fmt + go-bindata
2016-11-22 15:05:14 +01:00
Fabian Reinartz 1e01b2bdba nflog: add metrics (#518) 2016-11-21 15:22:35 +01:00
Fabian Reinartz b6851a5421 silences: fix concurrent cache writes (#561)
This fixes #559 by removing concurrent map writes to the matcher cache.
The cache was guarded by the Silence's main lock, which only used a
read-lock on queries.
The cache's get methods lazily loads data into the cache and thus
causing concurrent writes.

We just change the main lock to always write-lock, as we don't expect
high lock contention at this point and would have it in a dedicated
cache lock anyway.
2016-11-21 11:09:49 +01:00
Brian Brazil 406aacf141 Improve logging of API errors. (#553)
Previously errors would look like:
ERRO[0008] api error: {bad_data 0xc4201caae0}
source=api.go:534

Now they look like:
ERRO[0001] api error: bad_data: json: cannot unmarshal object into Go
value of type []*types.Alert  source=api.go:534
2016-11-18 16:50:15 +01:00
Mario Trangoni b640c219e5 Cut 0.5.0 (#543) (#546) 2016-11-12 13:05:19 +01:00
Fabian Reinartz a91fe17ddf Cut 0.5.0 (#543) 2016-11-01 17:24:42 +01:00
Björn Rabenstein 4ce1f9a0b7 Merge pull request #541 from prometheus/fix-continue-matching-routing-tree
Fix continue matching routing tree
2016-10-27 14:54:48 +02:00
stuart nelson 7078d18457 Regenerate static assets 2016-10-27 13:37:14 +02:00
stuart nelson 3ea0439a90 Missing semi-colon 2016-10-27 13:36:52 +02:00
stuart nelson 6bc77a1a14 Correctly render continue routing
Nodes with `continue: true` were being ignored,
and only the first match in the routing tree was
being highlighted.

Additionally, each node was incorrectly being set
to continue=true if nothing is received from the
API. The API sends nothing if continue=false.
2016-10-27 13:36:41 +02:00
Brian Brazil 85c4a0888f Merge pull request #531 from chlunde/inhibitrule-race
inhibitrule: defer Unlock to fix race
2016-10-08 21:13:00 +01:00
Carl Henrik Lunde 2935ff84e7 inhibitrule: defer Unlock to fix race 2016-10-08 22:07:29 +02:00
Fabian Reinartz 97acef1819 Merge pull request #530 from brancz/mesh-password
encrypt mesh communication
2016-10-07 16:39:38 +02:00
Frederic Branczyk 8a2f93a102
*: allow use of mesh encryption through password parameter 2016-10-07 16:19:42 +02:00
Fabian Reinartz a705ae8882 Merge pull request #527 from brancz/master
*: cut v0.5.0-beta.0
2016-10-06 11:54:27 +02:00
Frederic Branczyk 964f04cece
*: cut v0.5.0-beta.0 2016-10-06 11:25:01 +02:00
Fabian Reinartz 2433eebf48 Merge pull request #525 from brancz/fix-resolved-filter
notify: move resolved alert filtering to integration
2016-10-06 11:08:50 +02:00