This adds metrics that look like this:
```
alertmanager_alerts{state="active"} 6
alertmanager_alerts{state="suppressed"} 0
alertmanager_silences{state="active"} 1
alertmanager_silences{state="expired"} 1
alertmanager_silences{state="pending"} 0
```
This can be used to monitor alertmanager's usage and validate that
alertmanagers in a mesh have a similar number of silences and alerts.
* Inconsistent use of baseUrl and apiUrl arguments
Both are Strings, so flipping the order between
one invocation and another didn't raise any
argument from the compiler. The baseUrl argument
is actually unnecessary, and has been removed.
* Update bindata.go
* Don't send parts with empty templates.
* Add a MIME-Version: 1.0 header.
* Place text/html part last, as parts are supposed to be in increasing preference order.
* silences: avoid deadlock
Calling gossip.GossipBroadcast() will cause a deadlock if
there is a currently executing OnBroadcast* function.
See #982
* silence_test: better unit test to detect deadlocks
* added email notification text content support (configuration text)
added default email notification text content default value empty
converted email notification from html to multipart/alternatives with support to both html (first) and text (last)
ignore intellij IDE .idea working folder
* removed specific editor .gitignore entries
* renamed TEXT to Text as it's not an acronym
added TODO note to refactor multipart code to use standard go library
* refactored to use standard go mime/multipart library for text and html parts and bounderies
* use multipart createPart returned writer
added error handling while creating parts
removed unnecessary quotes from boundry string
* removed unnecessary comments
This is similar to `promtool check-config` and allows one
to validate the alertmanager configuration (as a git presubmit for example).
`govendor fetch github.com/spf13/{cobra,pflag}` was needed to
have support for `Args`.
* Provide README information for amtool
Amtool has been bundled with alertmanager for a while now. It's probably
far past the acceptable time to add information to the readme
* Fixups based on recommendations
* replace `,` with `.` in first sentance
* Add silence query example with filtering
* Add silence add example with multiple matchers and a regex
* Add silence expire all example that shows query -q
* Add configfile example
* Expose alert fingerprint in the API
Alert fingerprint is already provided as the value of status.inhibitedBy[] attribute that inhibited alerts have, but there's no way to get back to the alert that's inhibiting it as the fingerprint is not exposed.
* Expose alert fingerprint as ID in the list endpoint
* Rename ID to Fingerprint
* Use Fingerprint().String() in the API