Łukasz Mierzwa
612a0e817f
Rename ALERTMANAGER_URI to ALERTMANAGER_URIS
...
This will make upgrade more explicit since there is a syntax change
2017-06-28 22:36:26 -07:00
Łukasz Mierzwa
16be1627ed
Move all *InSlice functions into a slices package
2017-06-28 22:36:25 -07:00
Łukasz Mierzwa
26d14d1bd2
Refactor Alertmanager API client code to use multiple upstream instances
...
Alerts are stored per instance and deduplicated on read.
2017-06-28 22:35:16 -07:00
Łukasz Mierzwa
ea525794f1
Use url.Parse instead of govalidator for hiding passwords
2017-04-16 08:27:41 -07:00
Łukasz Mierzwa
0d82cffd79
Add -web.prefix / WEB_PREFIX option
...
This allows people to use unsee with a sub uri setup, which is pretty common usa case, fixes #22
2017-03-30 19:35:52 +01:00
Łukasz Mierzwa
66710c6020
Sanitize URLs to hide all passwords when logging runtime config
...
When unsee starts it will print runtime config, but this can contain password for URL keys, replace passwords with 'xxx' string
2017-03-28 11:00:16 -07:00
Łukasz Mierzwa
cbe15f71af
Add tests for config handling
2017-03-28 10:26:13 -07:00
Łukasz Mierzwa
fd7d3a3585
Move runtime config logging into separate function
...
This should only happen when needed, so moving this to a dedicated function that is called on startup
2017-03-28 09:10:15 -07:00
Łukasz Mierzwa
c8348ba325
Don't set the default value for flags
...
Let envconfig handle defaults, setting it for flags means that we'll always pass a value to the env if there was a default one, meaning that we're unable to override via env
2017-03-27 19:38:58 -07:00
Łukasz Mierzwa
6096e3a09b
Add port to the list of options
...
PORT env variable is used by gin, but adding it to the list of config options will generate a flag for it and provide value validation
2017-03-26 17:51:30 -07:00
Łukasz Mierzwa
3de3a9c481
Generate flag for each environment key
...
This allows to set config keys via flags, in additions to current env variable only configuration. Flags are autogenerated from supported env keys.
2017-03-26 13:38:37 -07:00
Łukasz Mierzwa
e239fd05fd
Import code from internal repository ( #1 )
...
Import code from internal repository
2017-03-23 16:58:04 -07:00