Łukasz Mierzwa
53f873b688
fix(backend): fix invalid error formatting
2018-08-27 23:44:56 +01:00
Łukasz Mierzwa
ebb115348f
chore(backend): add tests for Alertmanager 0.15.2
2018-08-14 18:38:27 +01:00
Łukasz Mierzwa
c6dc362186
fix(style): error strings should not be capitalized or end with punctuation or a newline
2018-08-11 23:03:02 +01:00
Łukasz Mierzwa
78bddce664
fix(style): check for bind errors in config
2018-08-11 22:59:10 +01:00
Łukasz Mierzwa
def3236645
fix(style): check of WriteString error return
2018-08-11 22:54:45 +01:00
Łukasz Mierzwa
b2a0f61d4e
fix(style): simplify append code
2018-08-11 22:46:34 +01:00
Łukasz Mierzwa
2ec3df93d7
fix(style): check for alertmanager.RegisterAlertmanager error return
2018-08-11 22:43:22 +01:00
Łukasz Mierzwa
305916a3f2
fix(style): remove dead code
2018-08-11 08:39:07 +01:00
Łukasz Mierzwa
64f072b7d2
fix(style): simplify assignments
2018-08-11 08:31:18 +01:00
Łukasz Mierzwa
fb17ed7e31
fix(style): simplify group appends
2018-08-11 08:29:03 +01:00
Łukasz Mierzwa
7a6538e8ff
fix(style): should omit comparison to bool constant
2018-08-11 08:25:57 +01:00
Łukasz Mierzwa
0310d9d4bc
fix(style): should merge variable declaration with assignment
2018-08-11 08:24:58 +01:00
Łukasz Mierzwa
b3709927f7
feat(api): add an enpoint that returns all known label values for given label name
...
This will be used in the silence form, to provide a list of suggestions
2018-08-10 17:36:00 +01:00
Łukasz Mierzwa
d934dbb053
feat(api): add /labelNames.json endpoint
...
This endpoint will be used for label name autocomplete in the silence form
2018-08-10 17:36:00 +01:00
Łukasz Mierzwa
77079a9629
feat(api): export annotation settings in the API
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
99a3671e9b
feat(ui): read config from index.html and use it to setup Sentry & default filters
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
2ee239a74c
refactor(api): move settings keys in the API response to a namespace
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
875a4f5217
feat(api): summarize alertmanager counts in group API
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
6c7ba5551c
refactor(api): move silences into a dedicated key in API response
...
A single silence can supress multiple alerts so to reduce response size and the amount of data react UI needs to track move it out of alert instance (which will deduplicate it) and on each alert only store a reference. In the API return all silences as a global dict and each alert only contains the ID of silences suppressing it.
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
79ff668019
refactor(api): deduplicate lables & annotations in API responses
...
Each alert in a group holds only keys that are unique to that alert instance, everything shared by the entire group is moved to group.shared ns
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
e1530e01cd
refactor(api): provide configured list of static labels in the API response
...
DOM data-* attributes are no longer used for this, feed react data store with this config so it can (re)render labels correctly
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
4fe19c3d73
feat(api): extra fields with parsed filter data in the API response
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
c0fdb71276
feat(api): expose total alerts counter in the api response
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
b7d274c93b
refactor(api): return alert groups as a mapping id->group
2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
c69f9875ec
chore(mock): add mock files for 0.15.0 & 0.15.1
2018-07-19 23:09:10 +02:00
Łukasz Mierzwa
2ffc926cf8
chore(mock): show progress of mock steps, add most recent Alertmanager releases
2018-07-19 22:49:49 +02:00
Łukasz Mierzwa
06c2706e24
fix(mock): refactor livemock.py so it doesn't depend on requests
2018-07-19 22:49:08 +02:00
Łukasz Mierzwa
b71883f1ef
Migrate to new repo
...
Forked unsee from cloudflare, so import paths needs to be updated
2018-06-07 15:30:57 +02:00
Łukasz Mierzwa
fd0eb46adf
Sanitize Alertmanager URI before putting it in /alerts.json reponse
...
Alertmanager URI might contain basic auth username & password, we should replace password with 'xxx' in logs and and error messages.
Go will still print it in HTTP request errors, but that will be fixed in the next Go release - https://go-review.googlesource.com/c/go/+/102855
Fixes #259
2018-04-27 09:36:12 -07:00
Łukasz Mierzwa
9de77e342d
Add mock files for Alertmanager 0.14.0
2018-02-16 09:35:07 +00:00
Łukasz Mierzwa
94ec8f084f
Set proxy value when logging configuration on startup
2018-02-01 21:09:36 -08:00
Łukasz Mierzwa
f6efebb934
Drop legacy settings
...
Those were left for compatibility and marked as deprecated, remove it for the next release
2018-02-01 21:09:36 -08:00
Łukasz Mierzwa
782b633f8c
Fix error checking in file read tests
2018-01-27 09:57:19 -08:00
Łukasz Mierzwa
b8cf0a83f4
Correctly handle all types of file:// values
...
For absolute paths we correctly return full decoded path, but for relative paths we can't simply strip file:// prefix as it might leave query args in place. Build absolute path by joining working dir + hostname part + path part.
Add an extra test case for coverage.
2018-01-27 09:54:19 -08:00
Łukasz Mierzwa
193c6cf372
Drop duplicated pflag.Parse call
2018-01-26 18:21:57 -08:00
Łukasz Mierzwa
ded69c11ff
Drop the path from v0.4 query args
...
This results in requests to 'GET http://localhost:9093/api/v1/silences?api/v1/silences?limit=2147483647 ' instead of 'GET http://localhost:9093/api/v1/silences?limit=2147483647 '. Too much copy&paste.
2018-01-25 19:34:35 -08:00
Łukasz Mierzwa
0f73b20bc6
Allow passing query args to HTTP requests send to the Alertmanager API
...
Alertmanager 0.4.x silences endpoint uses pagination, code for this was incorrectly dropped in #216 , re-add it. Requires a way for mapper packages to signal the need for passing query args to HTTP requests
2018-01-24 19:09:02 -08:00
Łukasz Mierzwa
60b1c696a3
Too many 'T' in NewHTTTPTransport
2018-01-24 13:04:27 -08:00
Łukasz Mierzwa
a0cf3cc43c
Add a JSON tag for ProxyRequests attr
2018-01-23 21:38:46 -08:00
Łukasz Mierzwa
49d1ed2e1e
Pass HTTP transport to the proxy
...
When we proxy requests we should use same transport as we use when collecting alerts & silences
2018-01-23 21:37:56 -08:00
Łukasz Mierzwa
d5a7cb9ace
Rename Transport interface to Reader
2018-01-23 19:40:24 -08:00
Łukasz Mierzwa
6f89a77f8d
Rename 'transport' package to 'uri'
...
This package adds handlers for different URI schemes, name clashes with http.Transport which is now passed around. Rename it to make it more obvious what it does
2018-01-23 19:32:39 -08:00
Łukasz Mierzwa
338a4c38a6
Drop duplicated function
...
There's identical method on the Alertmanager instance that's being used
2018-01-23 19:22:50 -08:00
Łukasz Mierzwa
24335ebf1f
Add support for passing path to custom TLS CA cert & client key/cert pair
...
This adds support for passing a custom http.RoundTripper so in effect we can customize TLS client config for HTTPS requests.
Fixes #184
2018-01-23 19:22:12 -08:00
Łukasz Mierzwa
c7fb8db98d
Drop Release() from SilenceMapper
...
Not used
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
1f89ba05fe
Migrate rest of the code to new mapper and transport packages
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
6124196b0f
Finish refactoring mapper package
...
Fix bugs, add docstrings and let each mapper give us full url since it doesn't handle any http requests now (it just maps text to objects now)
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
2cf9253d3c
Refactor transport package
...
With this change we'll initialize Transport object for each Alertmanager and just call Read() on it when we need to use this transport to read from upstream Alertmanager
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
0b30a23c2a
Refactor mapper package responsibilities
...
Mapper should only take input, decode it and map onto internal model instances
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
36178ee1ba
Add a 'simplified mode' for configuration that can be used with only one Alertmanager instance
2018-01-14 21:15:43 -08:00