From dbef98c9447498405d473f1697a5d39d1b4db90f Mon Sep 17 00:00:00 2001 From: yacut Date: Mon, 18 May 2020 13:31:42 +0200 Subject: [PATCH] adjust README.md remove prio custom config --- README.md | 15 ++++ ilert-icinga-with-priority.conf | 123 -------------------------------- 2 files changed, 15 insertions(+), 123 deletions(-) delete mode 100644 ilert-icinga-with-priority.conf diff --git a/README.md b/README.md index 037b9a0..b7807e0 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,18 @@ For setup instructions, refer to our integration guides below. ## Integration Guides * [iLert Icinga Integration](https://docs.ilert.com/integrations/icinga) + + +## Getting started with local icinga setup and iLert + +> Requirements: docker compose v3.7+ + +1. Start icinga locally +``` +docker-compose up -d +``` + +2. Replace `{{YOUR_API_KEY}}` placeholder with your alert source api key in the `./ilert-icinga.conf` file +3. Copy the `./ilert-icinga.conf` file to the `./data/icinga/etc/cicnga2/conf.d/` folder +4. Optional: copy the `./test-server-host.conf` file to the `./data/icinga/etc/cicnga2/conf.d/` folder +5. Open the `http://127.0.0.1:4080/icingaweb2/dashboard` url in your browser diff --git a/ilert-icinga-with-priority.conf b/ilert-icinga-with-priority.conf deleted file mode 100644 index 3ed539a..0000000 --- a/ilert-icinga-with-priority.conf +++ /dev/null @@ -1,123 +0,0 @@ -object User "ilert-high-priority" { - display_name = "iLert - high priority" - groups = [ "icingaadmins" ] - states = [ OK, Warning, Critical, Unknown] - types = [ Problem, Recovery, Acknowledgement ] - vars.additional_notes = "This is an iLert user for high priority incidents." - pager = "{{YOUR_API_KEY}}" -} - -object User "ilert-low-priority" { - display_name = "iLert - low priority" - groups = [ "icingaadmins" ] - states = [ OK, Warning, Critical, Unknown] - types = [ Problem, Recovery, Acknowledgement ] - vars.additional_notes = "This is an iLert user for low priority incidents." - pager = "{{YOUR_API_KEY}}" -} - -object NotificationCommand "ilert-notification-high-priority" { - import "plugin-notification-command" - - command = "/usr/local/bin/ilert-icinga.py --mode save --endpoint https://api.ilert.com" - - env = { - ICINGA_PRIORITY = "HIGH" - ICINGA_CONTACTPAGER = "$user.pager$" - ICINGA_NOTIFICATIONTYPE = "$notification.type$" - ICINGA_NOTIFICATIONAUTHORNAME = "$notification.author$" - ICINGA_NOTIFICATIONCOMMENT = "$notification.comment$" - ICINGA_LONGDATETIME = "$icinga.long_date_time$" - ICINGA_HOSTADDRESS = "$address$" - ICINGA_HOSTNAME = "$host.name$" - ICINGA_HOSTALIAS = "$host.display_name$" - ICINGA_HOSTSTATE = "$host.state$" - ICINGA_HOSTOUTPUT="$host.output$" - ICINGA_HOSTZONE="$host.zone$" - ICINGA_HOSTNOTESURL = "$host.notes_url$" - ICINGA_HOSTACTIONURL = "$host.action_url$" - ICINGA_HOSTICONIMAGE = "$host.icon_image$" - ICINGA_HOSTICONIMAGEALT = "$host.icon_image_alt$" - ICINGA_SERVICESTATE = "$service.state$" - ICINGA_SERVICEDESC = "$service.name$" - ICINGA_SERVICEDISPLAYNAME = "$service.display_name$" - ICINGA_SERVICEOUTPUT = "$service.output$" - ICINGA_SERVICENOTESURL = "$service.notes_url$" - ICINGA_SERVICEACTIONURL = "$service.action_url$" - ICINGA_SERVICEICONIMAGE = "$service.icon_image$" - ICINGA_SERVICEICONIMAGEALT = "$service.icon_image_alt$" - } -} - -object NotificationCommand "ilert-notification-low-priority" { - import "plugin-notification-command" - - command = "/usr/local/bin/ilert-icinga.py --mode save --endpoint https://api.ilert.com" - - env = { - ICINGA_PRIORITY= "LOW" - ICINGA_CONTACTPAGER = "$user.pager$" - ICINGA_NOTIFICATIONTYPE = "$notification.type$" - ICINGA_NOTIFICATIONAUTHORNAME = "$notification.author$" - ICINGA_NOTIFICATIONCOMMENT = "$notification.comment$" - ICINGA_LONGDATETIME = "$icinga.long_date_time$" - ICINGA_HOSTADDRESS = "$address$" - ICINGA_HOSTNAME = "$host.name$" - ICINGA_HOSTALIAS = "$host.display_name$" - ICINGA_HOSTSTATE = "$host.state$" - ICINGA_HOSTOUTPUT="$host.output$" - ICINGA_HOSTZONE="$host.zone$" - ICINGA_HOSTNOTESURL = "$host.notes_url$" - ICINGA_HOSTACTIONURL = "$host.action_url$" - ICINGA_HOSTICONIMAGE = "$host.icon_image$" - ICINGA_HOSTICONIMAGEALT = "$host.icon_image_alt$" - ICINGA_SERVICESTATE = "$service.state$" - ICINGA_SERVICEDESC = "$service.name$" - ICINGA_SERVICEDISPLAYNAME = "$service.display_name$" - ICINGA_SERVICEOUTPUT = "$service.output$" - ICINGA_SERVICENOTESURL = "$service.notes_url$" - ICINGA_SERVICEACTIONURL = "$service.action_url$" - ICINGA_SERVICEICONIMAGE = "$service.icon_image$" - ICINGA_SERVICEICONIMAGEALT = "$service.icon_image_alt$" - } -} - -apply Notification "ilert-host-notification-low-priority" to Host { - command = "ilert-notification-low-priority" - states = [ Up, Down ] - types = [ Problem, Acknowledgement, Recovery ] - period = "24x7" - users = [ "ilert-low-priority" ] - - assign where host.vars.notification.enable_ilert_low_priority == true -} - -apply Notification "ilert-host-notification-high-priority" to Host { - command = "ilert-notification-high-priority" - states = [ Up, Down ] - types = [ Problem, Acknowledgement, Recovery ] - period = "24x7" - users = [ "ilert-high-priority" ] - - assign where host.vars.notification.enable_ilert_high_priority == true -} - -apply Notification "ilert-service-notification-low-priority" to Service { - command = "ilert-notification-low-priority" - states = [ OK, Warning, Critical, Unknown ] - types = [ Problem, Acknowledgement, Recovery ] - period = "24x7" - users = [ "ilert-low-priority" ] - - assign where service.vars.notification.enable_ilert_low_priority == true -} - -apply Notification "ilert-service-notification-high-priority" to Service { - command = "ilert-notification-high-priority" - states = [ OK, Warning, Critical, Unknown ] - types = [ Problem, Acknowledgement, Recovery ] - period = "24x7" - users = [ "ilert-high-priority" ] - - assign where service.vars.notification.enable_ilert_high_priority == true -}