Commit Graph

14 Commits

Author SHA1 Message Date
Bartek Płotka 9ddc5f1348 opsgenie: Moved from deprecated, non documented teams to responders field. (#1863)
Teams config option will fail unmarshalling as it is deprecated.

Fixes https://github.com/prometheus/alertmanager/issues/1818

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2019-05-13 14:51:26 +02:00
Simon Pasquier 8dce9ac61f Add .golangci.yml
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-25 10:44:57 +02:00
Max Leonard Inden f1b920bcc9
api: Implement OpenAPI generated Alertmanager API V2
The current Alertmanager API v1 is undocumented and written by hand.
This patch introduces a new Alertmanager API - v2. The API is fully
generated via an OpenAPI 2.0 [1] specification (see
`api/v2/openapi.yaml`) with the exception of the http handlers itself.

Pros:
- Generated server code
- Ability to generate clients in all major languages
  (Go, Java, JS, Python, Ruby, Haskell, *elm* [3] ...)
    - Strict contract (OpenAPI spec) between server and clients.
    - Instant feedback on frontend-breaking changes, due to strictly
      typed frontend language elm.
- Generated documentation (See Alertmanager online Swagger UI [4])

Cons:
- Dependency on open api ecosystem including go-swagger [2]

In addition this patch includes the following changes.

- README.md: Add API section

- test: Duplicate acceptance test to API v1 & API v2 version

  The Alertmanager acceptance test framework has a decent test coverage
  on the Alertmanager API. Introducing the Alertmanager API v2 does not go
  hand in hand with deprecating API v1. They should live alongside each
  other for a couple of minor Alertmanager versions.

  Instead of porting the acceptance test framework to use the new API v2,
  this patch duplicates the acceptance tests, one using the API v1, the
  other API v2.

  Once API v1 is removed we can simply remove `test/with_api_v1` and bring
  `test/with_api_v2` to `test/`.

[1]
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md

[2] https://github.com/go-swagger/go-swagger/

[3] https://github.com/ahultgren/swagger-elm

[4]
http://petstore.swagger.io/?url=https://raw.githubusercontent.com/mxinden/alertmanager/apiv2/api/v2/openapi.yaml

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-09-04 13:38:34 +02:00
Simon Pasquier dc5fc02d22 [amtool] use kingpin.v2 (#1330)
* Use default values to store values from config
* fix typo and reserved keywork
* move to long help texts
* add one more unit test for resolver
* update comments

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-04-24 09:35:15 +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
Steve Durrheimer 9d4dccae7c
New release process using docker, circleci and a centralized
building tool
2016-04-22 21:46:53 +02:00
Fabian Reinartz 3181a65d8f Fix .gitignore for binary 2015-10-26 13:45:06 +01:00
Fabian Reinartz e0a003337e Fix .gitignore and include alertmanager API package 2015-10-02 12:41:41 +02:00
Fabian Reinartz 34527f510e Update vendoring, update .gitignore 2015-09-24 18:34:58 +02:00
Fabian Reinartz 84c7af9652 Remove docker files, update gitignore 2015-08-26 11:54:01 +02:00
Fabian Reinartz 59b28fedda ignore YAML files 2015-07-01 17:56:38 +02:00
Steve Durrheimer df0ce42d42 Add simple support for Slack notifications 2015-05-10 22:21:18 +02:00
Cameron Davison f4f6ceccc4 Add simple support for HipChat notifications 2015-04-13 17:49:46 -05:00
Julius Volz db87129fa8 Add .gitignore file.
Change-Id: I041bbc311bc817ab6ea1a54afafa46ab268513a1
2013-08-16 15:25:35 +02:00