{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/alertmanager/issues/587","repository_url":"https://api.github.com/repos/prometheus/alertmanager","labels_url":"https://api.github.com/repos/prometheus/alertmanager/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/alertmanager/issues/587/comments","events_url":"https://api.github.com/repos/prometheus/alertmanager/issues/587/events","html_url":"https://github.com/prometheus/alertmanager/pull/587","id":197009495,"number":587,"title":"add runcommand receiver","user":{"login":"rchicoli","id":10183963,"avatar_url":"https://avatars.githubusercontent.com/u/10183963?v=3","gravatar_id":"","url":"https://api.github.com/users/rchicoli","html_url":"https://github.com/rchicoli","followers_url":"https://api.github.com/users/rchicoli/followers","following_url":"https://api.github.com/users/rchicoli/following{/other_user}","gists_url":"https://api.github.com/users/rchicoli/gists{/gist_id}","starred_url":"https://api.github.com/users/rchicoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchicoli/subscriptions","organizations_url":"https://api.github.com/users/rchicoli/orgs","repos_url":"https://api.github.com/users/rchicoli/repos","events_url":"https://api.github.com/users/rchicoli/events{/privacy}","received_events_url":"https://api.github.com/users/rchicoli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-21T19:07:37Z","updated_at":"2017-01-28T19:20:26Z","closed_at":"2017-01-28T10:35:25Z","pull_request":{"url":"https://api.github.com/repos/prometheus/alertmanager/pulls/587","html_url":"https://github.com/prometheus/alertmanager/pull/587","diff_url":"https://github.com/prometheus/alertmanager/pull/587.diff","patch_url":"https://github.com/prometheus/alertmanager/pull/587.patch"},"body":"this implements the receiver `runcommand`, which enables the enduser to extend the functionality of a receiver with any script.\r\nThis might be useful for lots of people, which the notifiers are not added yet.\r\n\r\nConfiguration used for testing:\r\n\r\n```yaml\r\nglobal:\r\n\r\nroute:\r\n  group_by: ['alertname']\r\n  group_wait: 10s\r\n  group_interval: 15s\r\n  repeat_interval: 30s\r\n  receiver: run-custom-scripts\r\n\r\nreceivers:\r\n- name: 'run-custom-scripts'\r\n  runcommand_configs:\r\n  - script: 'sh /tmp/make-a-call.sh 911'\r\n  - script: '/tmp/notify-zabbix.sh'\r\n\r\n```\r\n\r\nIn addition is set some environment variable to the script:\r\n\r\n```bash\r\nPROMETHEUS_ANNOTATIONS_DESCRIPTION=This is a description of process fds\r\nPROMETHEUS_ANNOTATIONS_SUMMARY=Process File Descriptor\r\nPROMETHEUS_COMMONLABEL_ALERTNAME=ProcessFds Test\r\nPROMETHEUS_COMMONLABEL_INSTANCE=172.17.0.3:9090\r\nPROMETHEUS_COMMONLABEL_JOB=prometheus\r\nPROMETHEUS_COMMONLABEL_MONITOR=codelab-monitor\r\nPROMETHEUS_COMMONLABEL_SEVERITY=low\r\nPROMETHEUS_EXTERNALURL=http://a298bedb1f71:9093\r\nPROMETHEUS_GROUPLABEL_ALERTNAME=ProcessFds\r\nPROMETHEUS_RECEIVER=runcommand\r\nPROMETHEUS_STATUS=firing\r\n```\r\n\r\nhey @fabxc if you guys approve this, I am glad to provide the docs for it."},"comment":{"url":"https://api.github.com/repos/prometheus/alertmanager/issues/comments/275868472","html_url":"https://github.com/prometheus/alertmanager/pull/587#issuecomment-275868472","issue_url":"https://api.github.com/repos/prometheus/alertmanager/issues/587","id":275868472,"user":{"login":"rchicoli","id":10183963,"avatar_url":"https://avatars.githubusercontent.com/u/10183963?v=3","gravatar_id":"","url":"https://api.github.com/users/rchicoli","html_url":"https://github.com/rchicoli","followers_url":"https://api.github.com/users/rchicoli/followers","following_url":"https://api.github.com/users/rchicoli/following{/other_user}","gists_url":"https://api.github.com/users/rchicoli/gists{/gist_id}","starred_url":"https://api.github.com/users/rchicoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchicoli/subscriptions","organizations_url":"https://api.github.com/users/rchicoli/orgs","repos_url":"https://api.github.com/users/rchicoli/repos","events_url":"https://api.github.com/users/rchicoli/events{/privacy}","received_events_url":"https://api.github.com/users/rchicoli/received_events","type":"User","site_admin":false},"created_at":"2017-01-28T19:20:26Z","updated_at":"2017-01-28T19:20:26Z","body":"No problem, I still think that this is a bit confusing, but I guess I misunderstand it. Anyways, next time I am up to writing a new receiver I will try to get in contact to you guys. Keep it up the good work."}}
{"actor":{"display_login":"rchicoli"}}