Commit bfe2633a authored by Markus Frosch's avatar Markus Frosch

Add README.md

parent 7ed481be
Pipeline #176 failed with stage
in 20 seconds
Icinga 2 Puppet Module Notification Test
========================================
Puppet module to test notifications in a test cluster.
Contains scripts and configuration.
## Usage
```puppet
include ::icinga2_notificationtest
```
Configuration for Icinga 2 can look like this:
```icinga2
object NotificationCommand "log-host-notification" {
command = [ SysconfDir + "/icinga2/scripts/log-notification.sh" ]
env = {
OBJECT = "host"
NOTIFICATIONTYPE = "$notification.type$"
HOSTNAME = "$host.name$"
STATE = "$host.state$"
OUTPUT = "$host.output$"
NOTIFICATIONAUTHORNAME = "$notification.author$"
NOTIFICATIONCOMMENT = "$notification.comment$"
USERNAME = "$user.name$"
}
}
object NotificationCommand "log-service-notification" {
command = [ SysconfDir + "/icinga2/scripts/log-notification.sh" ]
env = {
OBJECT = "service"
NOTIFICATIONTYPE = "$notification.type$"
SERVICEDESC = "$service.name$"
HOSTNAME = "$host.name$"
STATE = "$service.state$"
OUTPUT = "$service.output$"
NOTIFICATIONAUTHORNAME = "$notification.author$"
NOTIFICATIONCOMMENT = "$notification.comment$"
USERNAME = "$user.name$"
}
}
```
```icinga2
template Notification "mail-host-notification" {
command = "log-notification"
states = [ Up, Down ]
types = [ Problem, Acknowledgement, Recovery, Custom,
FlappingStart, FlappingEnd,
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
period = "24x7"
}
template Notification "mail-service-notification" {
command = "log-notification"
states = [ OK, Warning, Critical, Unknown ]
types = [ Problem, Acknowledgement, Recovery, Custom,
FlappingStart, FlappingEnd,
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
period = "24x7"
}
```
## Copyright
Copyright (C) 2016 Icinga Development Team <info@icinga.com>
2016 Markus Frosch <markus.frosch@icinga.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment