Skip to content

Commit

Permalink
Added icinga2 module
Browse files Browse the repository at this point in the history
  • Loading branch information
ManiacTwister committed Jan 31, 2019
1 parent 194d161 commit 4c2cfaf
Show file tree
Hide file tree
Showing 7 changed files with 479 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,20 @@ This dictionary maps full project paths (groupname/projectname) to IRC-channels.
Receives arbitrary messages as text via a HTTP `POST` request and forwards this message line by line to a channel.
The channel can be specified by the `channel` query parameter, otherwise the `default_channel` from the config will
be used.

### Icinga2
Receives webhooks from Icinga2. Add [icinga2-notifications-webhook] to your icinga2 installation to send the
required webhooks.

When a webhook is received this module will first check if there is an explicit
mapping in the configuration especially for this host. If yes, this channel will be used. If not, the module will
look if there exists for the hostgroup. If yes, this channel will be used. If not, the `default` channel will be used.

**Module specific configuration**
```
- hostgroups
This dictionary maps Icinga2 hostgroups to IRC-channels.
- explicit
This dictionary maps hostnames to IRC-channels.
```
[icinga2-notifications-webhook]: https://git.s7t.de/ManiacTwister/icinga2-notifications-webhook
9 changes: 9 additions & 0 deletions cpthook.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,13 @@ modules:
simple:
enabled: True
default_channel: "#defaultChannel"
icinga2:
enabled: True
default: "#monitoring"
hostgroups:
"webservers":
- "#monitoring-web"
explicit:
"host.example.tld":
- "#monitoring-example"

Loading

0 comments on commit 4c2cfaf

Please sign in to comment.