32 Commits

Author SHA1 Message Date
Richard Maynard
ec14be0288 feat(backend): add support for custom headers (#368)
This will allow the AlertManager upstreams to be sent user defined HTTP headers.
2019-01-17 08:53:33 +00:00
Łukasz Mierzwa
e1f9686e3f feat(backend): allow stripping annotations
This allows same filtering we already have with labels. Fixes #312
2019-01-15 22:12:23 +00:00
Łukasz Mierzwa
13dfae617c fix(config): default to 'karma.yaml' config file
If config.file is not set try loading 'karma.yaml' from current directory. This is the documented behaviour and it used to work before, got broken when config.file was modified to accept a full path instead of just the file name

Fixes #261
2018-11-22 22:46:26 +00:00
Łukasz Mierzwa
8d0b8037c6 feat(project): add support for loading extra css/js files 2018-10-30 20:56:44 +00:00
Łukasz Mierzwa
a7d695cec1 fix(config): use correct variable name for --config.file
Fixes issue introduced in #28
2018-09-16 00:17:24 +01:00
Łukasz Mierzwa
6932f25a37 chore(config): simplify configuration flags
Drop config.dir and use config.file to pass full path to the config file. Passing two options is just an unnecessary complexity
Fixes #22.
2018-09-15 14:15:08 +01:00
Łukasz Mierzwa
84cda643f3 fix(config): command line flags are parsed twice, drop automatic parsing 2018-09-12 21:50:21 +01:00
Łukasz Mierzwa
9c16ffa447 chore(project): rename from unsee to karma
Fixes prymitive/unsee#23
2018-09-09 14:12:26 +01:00
Łukasz Mierzwa
cd0ef2421c feat(tests): more backend tests 2018-09-07 22:03:33 +01:00
Łukasz Mierzwa
53f873b688 fix(backend): fix invalid error formatting 2018-08-27 23:44:56 +01:00
Łukasz Mierzwa
78bddce664 fix(style): check for bind errors in config 2018-08-11 22:59:10 +01: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
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
193c6cf372 Drop duplicated pflag.Parse call 2018-01-26 18:21:57 -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
36178ee1ba Add a 'simplified mode' for configuration that can be used with only one Alertmanager instance 2018-01-14 21:15:43 -08:00
Łukasz Mierzwa
b6dd993c2b Add support for proxying user connection to Alertmanager
Fixes #190.

With this feature unsee can be configured to proxy requests to selected Alertmanager instances, if it's enabled unsee silence form will send a request via unsee rather than directly. This allows users to manage silences in environments where they have access to unsee but not to Alertmanager. Only silences endpoints on Alertmanager API are proxied.
2018-01-03 16:17:58 -08:00
Łukasz Mierzwa
1789e43631 Hide sentry secrets in startup logs
No need to leak sentry secrets in the internal DSN
2017-12-04 16:10:19 -08:00
Łukasz Mierzwa
99507cf023 Allow --config.* flags to be also passed via env variables 2017-12-03 11:46:14 -08:00
Łukasz Mierzwa
7fa4230a1d More config test coverage for both legacy and current paths 2017-12-03 11:34:12 -08:00
Łukasz Mierzwa
e23b00c080 Fix listen address and port passing
Only HOST & PORT env variables used by gin internally were really used, pass resulting config to gin so we match documentation, and log it on startup
2017-12-03 10:26:41 -08:00
Łukasz Mierzwa
65a27b39df Move label coloring config options from 'color' to 'labels' section 2017-12-03 10:09:17 -08:00
Łukasz Mierzwa
860375650e Add --receivers.keep for consistency with other options
there's --labels.keep so same should apply to receivers, add new option, tests and fixes as it wasn't working properly
2017-12-02 21:51:31 -08:00
Łukasz Mierzwa
5f904ec99d Move configuration related docs to a dedicated file and rewrite those to match new config file. 2017-12-02 21:10:16 -08:00
Łukasz Mierzwa
6273a5a585 Rewrite flag & env handling to use viper
This adds support for reading configuration from file, env support is still there and legacy env variables will still work, but flags are now following config schema, so they don't match old flags.
Having a config file allows to express more complex configuration options, which is needed for some feature requests.
2017-11-27 20:34:36 -08:00
Luke Overend
f8c327c2d7 Add REMOVE_RECEIVERS option
This option allows for all alerts for a specified receiver, or list of
receivers, to be removed from unsee.

My use case for this is using a receiver for auto-remediation which will
contain information that the user will never need to see in the UI.
2017-11-24 07:51:07 +00:00
Łukasz Mierzwa
ab25daf6c9 Implement logic for setting annotation visibility
This allows to signal to the UI which annotations to hide and which to show by default, user still can view hidden ones
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
24af661636 Add config options for controlling annotations visibility 2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
549ff9eefd Add KEEP_LABELS option for whitelisting labels
This allows to provide a list of labels that are the only labels allowed in the UI, reversing the logic of STRIP_LABELS.
Fixes #170
2017-08-11 12:28:02 -07:00
Łukasz Mierzwa
5d4ae47888 Convert all packages to be internal
Internal packages are supported by Go 1.5+, any package in /internal/ dir is only importable from the same repo. This will cleanup main dir a bit and provide better namespace for unsee subpackages
2017-08-04 16:21:27 -07:00