{"action":"closed","issue":{"url":"https://api.github.com/repos/coreos/prometheus-operator/issues/389","repository_url":"https://api.github.com/repos/coreos/prometheus-operator","labels_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/389/comments","events_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/389/events","html_url":"https://github.com/coreos/prometheus-operator/issues/389","id":232291839,"number":389,"title":"Clarify alertmanager configuration and templates documentation","user":{"login":"slok","id":128204,"avatar_url":"https://avatars0.githubusercontent.com/u/128204?v=3","gravatar_id":"","url":"https://api.github.com/users/slok","html_url":"https://github.com/slok","followers_url":"https://api.github.com/users/slok/followers","following_url":"https://api.github.com/users/slok/following{/other_user}","gists_url":"https://api.github.com/users/slok/gists{/gist_id}","starred_url":"https://api.github.com/users/slok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slok/subscriptions","organizations_url":"https://api.github.com/users/slok/orgs","repos_url":"https://api.github.com/users/slok/repos","events_url":"https://api.github.com/users/slok/events{/privacy}","received_events_url":"https://api.github.com/users/slok/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-30T15:28:36Z","updated_at":"2017-05-31T15:40:06Z","closed_at":"2017-05-31T15:40:06Z","body":"Hi!\r\n\r\nI was configuring the altermanager on the operator and I've reach the point that the documentation wasn't very clear.\r\n\r\nI started with the alertmanager configuration, I read the [spec](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec) and didn't saw where is the alertmanager configuration set, then I went to the [user guides](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md) and I could imagine how to do it, but it's not clear at all, so I started [reading the code](https://github.com/coreos/prometheus-operator/tree/e31a9dc1f309ae7ef1aa479802303e33d69a333e/pkg/alertmanager/statefulset.go#L273-L279) and I saw that the secret needs to be called `alertmanager-{alertmanager_name}`. \r\n\r\nThen it came the templating stuff, my configuration needs templates, so I searched for a place to set a ConfigMap or Secret and I didn't saw anything on the [AlertmanagerSpec](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec) neither, I ended up setting it on the same secret resource as the configuration, like this:\r\n```\r\napiVersion: v1\r\nkind: Secret\r\nmetadata:\r\n  name: alertmanager-main\r\ndata:\r\n  alertmanager.yaml: ............\r\n  hipchat.tmpl: ............\r\n```\r\nand then using this path for the templates on the alertmanager.conf:\r\n```\r\ntemplates:\r\n- '*.tmpl'\r\n```\r\n"}}
{"actor":{"display_login":"brancz"}}