You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can create your own alarm rules in Check_MK.
72
74
@@ -152,26 +154,32 @@ else
152
154
fi
153
155
```
154
156
155
-
### Custom user attribute
157
+
### CUSTOM USER ATTRIBUTE
156
158
You can add a custom user attribute and use it in your script.
157
-
Go TO `Setup>UsersCustom>user attributes` and create a custom attribute named `TELEGRAMCHAT`, do not change the name, you can change the Title and Help Text.
158
-
<imgsrc="images/create_custom_user_attribute.PNG"alt="Custom User attribute creation"width="100%"/>
159
+
Go TO `Setup > UsersCustom > user attributes` and create a custom attribute named `TELEGRAMCHAT`, do not change the name, you can change the Title and Help Text.
160
+
<imgsrc="images/create_custom_user_attribute.png"alt="Custom User attribute creation"width="100%"/>
159
161
160
-
#### Optional custom macro
161
-
Go To `Setup>Events>Notification configuration>` and edit your notifcation. Add a custom macro.
162
+
###CUSTOM MACRO (OPTIONAL)
163
+
Go To `Setup > Events > Notification configuration>` and edit your notifcation. Add a custom macro.
162
164
163
-
Regex : ```\d{5,}```
165
+
This pattern will accept numbers with or without an optional minus sign and requires a minimum of 5 digits.:
166
+
Regex : ```^-?\d{5,}$```
164
167
165
-
The Macro checks for an at least 5 digit long number, if your Chatid differs, you can adjust that, this also ensures that only those with a chatid set up will get notified. (could work also as a whitelist)
168
+
- Breakdown:
169
+
```
170
+
^: Start of the string.
171
+
-?: An optional minus sign.
172
+
\d{5,}: Five or more consecutive digits.
173
+
$: End of the string.
174
+
```
166
175
167
-
<imgsrc="images/notification_custom_macro.PNG"alt="Custom macro for notification"width="100%"/>
176
+
The Macro checks for an at least 5 digit long number, if your Chatid differs, you can adjust that, this also ensures that only those with a chatid set up will get notified. (could work also as a whitelist)
168
177
178
+
<imgsrc="images/notification_custom_macro.png"alt="Custom macro for notification"width="100%"/>
169
179
170
180
Edit your user and enter your Group/Chat-ID
171
181
172
-
173
-
<imgsrc="images/user_add_chat_id.PNG"alt="Custom macro for notification"width="100%"/>
174
-
182
+
<imgsrc="images/user_add_chat_id.png"alt="Custom macro for notification"width="100%"/>
175
183
176
184
## TROUBLESHOOTING
177
185
For more details and troubleshooting with parameters please check:
@@ -182,6 +190,7 @@ For more details and troubleshooting with parameters please check:
182
190
## CONTRIBUTIONS
183
191
* Thank you for the excellent code optimization contributions and additional information [ThomasKaiser](https://github.com/ThomasKaiser).
184
192
* Best regards to [Jonathan Barratt](https://github.com/reduxionist) in Bangkok and many thanks for adding emojies to the module.
193
+
* Many thanks to [progamernoob](https://github.com/progamernoob) for the contributions and enhancements to custom user attributes and macros.
185
194
186
195
## LICENSE
187
196
checkmk-telegram-notify and all individual scripts are under the BSD 3-Clause license unless explicitly noted otherwise. Please refer to the LICENSE
0 commit comments