How-to configure custom notification attributes
LAST TESTED ON CHECKMK 2.2.0P1
Getting Started
Background information regarding this subject is available on our:
Step-by-step guide
Custom Service attributes
Related werk: https://checkmk.com/check_mk-werks.php?werk_id=7185
Setup → Global Settings → User Interface → Custom Service attributes → Add new element
ID: NOTIFY_CUSTOM
Title: Notify Service
Setup → Services → Service Monitoring Rules → Custom service attributes → Add Rule → Add new element
 Your attribute is now available for 3rd Party notification tools. Now you can write your own Notification script and use your attribute.
Custom Host attributes
Setup → Host → Custom Host Attributes → Add Host Attribute
Setup → Hosts → Edit properties of Host → Custom Attributes
Your attribute is now available for 3rd Party notification tools. Now you can write your own Notification script and use your attribute.
Custom User Attributes
- Setup → Users → Custom user attributes → Add User Attribute
- Setup → Users → Edit User Properties
Set the values for the newly defined custom attributes. - Setup → Events → Notifications → Edit Notification rule
Restrict the contact selection by using the defined custom attributes: In the notify.log, it will then look like this:
2021-06-18 16:39:37,129 [20] [cmk.base.notify] Global rule ''... 2021-06-18 16:39:37,129 [20] [cmk.base.notify] -> matches! 2021-06-18 16:39:37,129 [20] [cmk.base.notify] - skipping contact User2: value '' for macro 'Team1_Pikett' does not match 'y$'. His macros are: 2021-06-18 16:39:37,129 [20] [cmk.base.notify] - skipping contact testuser: value '' for macro 'Team1_Pikett' does not match 'y$'. His macros are: 2021-06-18 16:39:37,129 [20] [cmk.base.notify] - skipping contact snapintest: value '' for macro 'Team1_Pikett' does not match 'y$'. His macros are: 2021-06-18 16:39:37,129 [20] [cmk.base.notify] - skipping contact User1: value '' for macro 'Team1_Pikett' does not match 'y$'. His macros are: 2021-06-18 16:39:37,130 [20] [cmk.base.notify] - skipping contact automation: value '' for macro 'Team1_Pikett' does not match 'y$'. His macros are: 2021-06-18 16:39:37,130 [20] [cmk.base.notify] - adding notification of cmkadmin via mail 2021-06-18 16:39:37,131 [20] [cmk.base.notify] Executing 1 notifications: 2021-06-18 16:39:37,131 [20] [cmk.base.notify] * notifying cmkadmin via mail, parameters: elements, graphs_per_notification, notifications_with_graphs, bulk: no
Related articles