Skip to content

Commit

Permalink
Merge pull request #1 from itweserems/dev
Browse files Browse the repository at this point in the history
Initial package
  • Loading branch information
itweserems authored Dec 12, 2023
2 parents 0c39a0b + 853f02a commit 1cca213
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## 1.0.0
- Initial package setup
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions local/share/check_mk/notifications/zammad_host.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions local/share/check_mk/notifications/zammad_service.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1cca213

Please sign in to comment.