Commit Graph

22 Commits

Author SHA1 Message Date
Ł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
a1eab56649 Migrate all old env usages to the new naming scheme 2017-12-02 21:55:43 -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
Łukasz Mierzwa
b52ab532e6 Fix relative path handling for file:// links 2017-11-26 10:45:39 -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
24898eb579 Add missing mock files for alertmanager 0.11.0
5602181b0a is missing mock files
2017-11-19 09:28:35 -08:00
Łukasz Mierzwa
5602181b0a Add alertmanager 0.11.0 test files 2017-11-17 21:54:22 -08:00
Łukasz Mierzwa
f2db8f753a Add Alertmanager 0.10.0 test files 2017-11-09 21:53:31 -08:00
Łukasz Mierzwa
f19395cec0 Add tests for Alertmanager 0.9.1 2017-10-02 09:03:29 -07:00
Łukasz Mierzwa
a36dbb707e Add tests for Alertmanager 0.9.0
No code changes needed to support 0.9.0, so only adding tests
2017-09-28 19:11:33 -07:00
Łukasz Mierzwa
40604453ee Add tests for annotations 2017-09-07 12:15:32 -07: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
aa606eff12 Migrate tests to new annotation scheme 2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
54b1455276 Use dedicated struct for storing alert annotations
Annotations are just string maps, but to render those we need a bit more information (is it a link, should it be visible by default). Store them as more complex structs internally, this also allows us to drop alert.Links since we now have enough information to tell if annotation is a link
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
3608ccba21 Strip labels in dedup, not on pull
Strippling labels should be done after alerts are deduplicated, when user requests some alerts with a filter, not during data collection from Alertmanager. When labels are stripped before dedup then they are merged into one, because labels are needed to calculate uniqueness, which means we will return wrong data
2017-08-11 12:28:02 -07:00
Łukasz Mierzwa
d1d4a85409 Add a test for total number of alerts we get from mock, should be 24 2017-08-11 12:28:02 -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