Skip to content

Commit a162529

Browse files
committed
Check_MK version 2.0.0 documentation
1 parent 22b545a commit a162529

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

README.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,31 @@
22
<img src="images/logo.png" alt="Telegram notification example" width="300" align="right" hspace="30" vspace="20"/>
33
Telegram has long been one of my real-time communication media. It is obvious to output monitoring messages for server and network components as alarm messages. There are several scripts for this on the internet, but most of them are written in Python, many of them have problems with Python3 and its libraries. Instead of spending hours and hours with Python, I decided to use a scripting language I know and write a Linux Bash script for it.
44

5-
The following Script is for Check_MK, I have used it exclusively with the RAW version 1.6.0_p18.
65

76
<!-- TOC -->
87

98
- [Check_MK Telegram notification](#check_mk-telegram-notification)
9+
- [COMPATIBILITY](#compatibility)
1010
- [EXAMPLE](#example)
1111
- [REQUIREMENTS](#requirements)
1212
- [INSTALLATION](#installation)
1313
- [CHECK_MK CONFIGURATION](#check_mk-configuration)
14-
- [PRIVACY ANONYMIZATION / MASQUERADING](#privacy-anonymization--masquerading)
14+
- [CHECK_MK VERSION 2.0.0 AND ABOVE](#check_mk-version-200-and-above)
15+
- [CHECK_MK VERSION 1.6.0](#check_mk-version-160)
16+
- [ACTIVATE CHANGES](#activate-changes)
17+
- [PRIVACY ANONYMIZATION / MASQUERADING](#privacy-anonymization--masquerading)
1518
- [PAGER ADDRESS CHAT-ID INSTEAD OF TELEGRAM GROUP-ID](#pager-address-chat-id-instead-of-telegram-group-id)
1619
- [TROUBLESHOOTING](#troubleshooting)
1720
- [CONTRIBUTION](#contribution)
1821
- [LICENSE](#license)
1922

2023
<!-- /TOC -->
2124

25+
## COMPATIBILITY
26+
- Check_MK RAW version 1.6.0_p18
27+
- Check_MK RAW version 2.0.0_p4
28+
- Should also work with other versions of Check_MK
29+
2230
## EXAMPLE
2331
Notifications are usually sent via a Telegram group. Here is an example of how a Telegram notification is structured.
2432

@@ -56,6 +64,24 @@ chmod +x check_mk_telegram-notify.sh
5664
```
5765

5866
## CHECK_MK CONFIGURATION
67+
### CHECK_MK VERSION 2.0.0 AND ABOVE
68+
Now you can create your own alarm rules in Check_MK.
69+
70+
```Setup → Events → Notifications```
71+
72+
First create a clone of your existing mail notification rule
73+
74+
<img src="images/global_notification_rules_create_clone_v2.png" alt="Create clone" width="600"/>
75+
76+
* Change the description (e.g. Notify all contacts of a host/service via Telegram)
77+
* The notification method is "Push Notification (by Telegram)"
78+
* Select option "Call with the following parameters:"
79+
* As the first parameter we set the Telegram token ID (without bot-prefix)
80+
* The second parameter is the Telegram Chat-ID or Telegram Group-ID
81+
82+
<img src="images/create_new_notification_rule_for_telegram_v2.png" alt="Adjust settings" width="600"/>
83+
84+
### CHECK_MK VERSION 1.6.0
5985
Now you can create your own alarm rules in Check_MK.
6086

6187
```WATO → Notifications → New Rule → Notification Method → Push Notification (using Telegram)```
@@ -76,18 +102,23 @@ If everything was ok, you will see your new Notification Rule afterwards
76102

77103
<img src="images/notification_configuration_change.png" alt="Final result" width="600"/>
78104

105+
### ACTIVATE CHANGES
79106
To activate it you have to press "1 Change" and "Activate affected"
80107

81108
<img src="images/activate_affected.png" alt="Activate changes and commit" width="100"/>
82109

110+
Since Check_MK 2.0.0 it is calles "Active on selected sites"
111+
112+
<img src="images/activate_on_selected_sites.png" alt="Active on selected sites" width="150"/>
113+
83114
To ensure that the parameters are also transferred in the event of an alert, it is strongly recommended that the Check_MK instance is restarted.
84115
```
85116
su - mysite
86117
omd stop
87118
omd start
88119
```
89120

90-
## PRIVACY ANONYMIZATION / MASQUERADING
121+
### PRIVACY ANONYMIZATION / MASQUERADING
91122
The current version of this script allows you to optionally enable IP anonymization. This gives you the option to comply with your own privacy policy or the recommendations of data protection authorities in certain countries if they prohibit the transmission of the full IP address. This masks IPv4 and IPv6 IP addresses before they are transmitted in a message to the Telegram service.
92123

93124
The activation of the privacy settings is realized directly in the Notification Rules in Check_MK by NOTIFY_PARAMETER_3, here the value "privacy" has to be entered:

images/activate_on_selected_sites.png

2.45 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)