Make alertmanager config on status page readable
The current wall of yaml on the status page is relatively unhelpful.
The config is also sent to the status page as JSON. We could parse this and then provide collapsible sections for the config, and potentially even allowing cool things like clicking on a route's receiver and then showing the receiver.
The config is also sent to the status page as JSON.
That doesn't sound right, it should be coming as raw text in YAML format as at some point in the future we'll hopefully be able to keep comments. This should be kept consistent with Prometheus, and part of the idea is to see the actual config as it has been parsed.
We send both raw text in YAML format and the parsed config marshaled as JSON:
https://github.com/prometheus/alertmanager/blob/master/api/api.go#L193-L194
Since it's just YAML, an in-place editor for quick experimentation would be really neat. Maybe a new feature?
The only planned way to change the config, is for users to do so on disk and then reload.
Also please remind yourself that we still need to exclude secrets from the UI. Allowing in place edits seems difficult with that condition.
Providing a collapsible view a la https://github.com/Microsoft/elm-json-tree-view would be very helpful. v2 api provides the yaml config, functionality similar to the above would potentially be helpful for reading larger config files. For context, our config file is written out by chef, but it is heavily templated. Reading the actual config file on the server is difficult because of managing indentation and keeping the above context in your head.