diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..125a862 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog + +## 1.0.0 +- Initial package setup \ No newline at end of file diff --git a/README.md b/README.md index 37e298a..31adcb7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# cmk-zammad-notify +# CheckMK-Zammad-Notify CheckMK Add-On: Create Zammad tickets on monitoring events with auto-close and auto-update functions. + +## How to configure + +You can follow this very good official Zammad documentation, where both .sh-scripts result from: https://admin-docs.zammad.org/de/latest/system/integrations/checkmk/setup-guide.html + +In short you can follow these steps: + +### CheckMK: package install +This package delivers two new notification methods to CheckMK2: +- Zammad Host: Notify Zammad about host issues +- Zammad Service: Notify Zammad about service issues + +Install the MKP package from here: [Link](https://exchange.checkmk.com/u/itweserems) + +After this you will have two new notification methods in CheckMK2 Setup > Events > Notifications. + +### Zammad: enable integration +In Zammad you must enable the builtin CheckMK integration in Zammad Admin Panel > System > Integrations > Checkmk. Here you can also find the API endpoint URL, which you need to update manually in both .sh-files as mentioned earlier. + +### CheckMK: script configuration +Now from Zammad you get your individual API URL, which you **have to manually change** in the following files inside your omd site path: +- local/share/check_mk/notifications/zammad_host.sh +- local/share/check_mk/notifications/zammad_service.sh \ No newline at end of file diff --git a/local/share/check_mk/notifications/zammad_host.sh b/local/share/check_mk/notifications/zammad_host.sh new file mode 100644 index 0000000..0cff579 --- /dev/null +++ b/local/share/check_mk/notifications/zammad_host.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Zammad Host + +curl --insecure -X POST \ + -F "event_id=$NOTIFY_HOSTPROBLEMID" \ + -F "host=$NOTIFY_HOSTNAME" \ + -F "state=$NOTIFY_HOSTSTATE" \ + -F "text=$NOTIFY_HOSTOUTPUT" \ + https://zammad.local/api/v1/integration/check_mk/d4e9682f38fe250d606abf1af8987725 # see Zammad Admin Panel > System > Integrations > Checkmk > Usage \ No newline at end of file diff --git a/local/share/check_mk/notifications/zammad_service.sh b/local/share/check_mk/notifications/zammad_service.sh new file mode 100644 index 0000000..18ab101 --- /dev/null +++ b/local/share/check_mk/notifications/zammad_service.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Zammad Service + +curl --insecure -X POST \ + -F "event_id=$NOTIFY_SERVICEPROBLEMID" \ + -F "host=$NOTIFY_HOSTNAME" \ + -F "service=$NOTIFY_SERVICEDESC" \ + -F "state=$NOTIFY_SERVICESTATE" \ + -F "text=$NOTIFY_SERVICEOUTPUT" \ + https://zammad.local/api/v1/integration/check_mk/d4e9682f38fe250d606abf1af8987725 # see Zammad Admin Panel > System > Integrations > Checkmk > Usage \ No newline at end of file