How-to configure custom notification attributes

It is possible to declare custom attributes. By default, the custom attributes are just fields in the configuration GUI that you can use to store host/service-related values.

LAST TESTED ON CHECKMK 2.2.0P1

Table of Contents

Getting Started

Background information regarding this subject is available on our:

Step-by-step guide

Custom Service attributes




  1. SetupGlobal SettingsUser InterfaceCustom Service attributesAdd new element

    Screenshot of edit global settings. Custom service attributes has settings of ID set to Notify_Custom and Title set to Notify Service

    ID: NOTIFY_CUSTOM

    Title: Notify Service


  2. Setup →  ServicesService Monitoring RulesCustom service attributesAdd RuleAdd new element

    Screenshot of custom service attributes. Custom service attributes for Notify Service set to test test


  3.  Your attribute is now available for 3rd Party notification tools. Now you can write your own Notification script and use your attribute.

    Screenshot of custom service attributes. Custom service attributes for Notify Service set to test test

Custom Host attributes


  1. SetupHostCustom Host Attributes Add Host Attribute

    Screenshot of host attributes. Show host in tables and Add to monitoring config enabled.


  2. Setup → Hosts → Edit properties of HostCustom Attributes

    Screenshot of properties of mysite01. Notify host with text of test test enabled.


  3. Your attribute is now available for 3rd Party notification tools. Now you can write your own Notification script and use your attribute.

    Screenshot of properties of mysite01. Notify host with text of test test enabled.

Custom User Attributes

  1. SetupUsersCustom user attributesAdd User Attribute

    Screenshot of adding user attributes. Name is and title is Team1 Pikett.


  2. SetupUsersEdit User Properties

    Set the values for the newly defined custom attributes.

    Screenshot of editing user cmkadmin. Notifications set for team 1 to Y and team 2 to n.



  3. SetupEventsNotificationsEdit Notification rule

    Restrict the contact selection by using the defined custom attributes:

    Screenshot of notification rule 0. Restrict by custom macros enabled. Name of macro is team1 pikett and required match is Y.



  4. 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