This file is indexed.

/usr/share/doc/check-mk-doc/treasures/notifications/slack is in check-mk-doc 1.2.8p16-1ubuntu0.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/bash
# Notify via Slack

# In order to use this script:
# - copy it into your site into ~/local/share/check_mk/notificaions
# - make sure it is executable
# - adapt the variable TEXT= to your needs
# - insert your correct Slack-URL into URL=
# - create a notification rule that makes use of the new plugin

TEXT="$NOTIFY_HOSTNAME: $NOTIFY_SERVICEDESC: $NOTIFY_SERVICESTATE $NOTIFY_SERVICEOUTPUT"
URL="https://hooks.slack.com/services/A08BZU3D0/B08C03CKQ/owiefjowiejfoweijfwoeiju"

curl -X POST --data-urlencode 'payload={"channel": "#check_mk", "username": "webhookbot", "text": "'"$TEXT"'", "icon_emoji": ":ghost:"}' "$URL"