Thursday, June 23, 2011

HowTo - Selectively enable service notifications in Check_mk / OMD

Check_mk installed via Open Monitoring Distribution are an extremely powerful combination for monitoring devices on a network.

Notifications from Nagios for the services discovered by Check_mk can overwhelm your inbox / mobile phone if notification for all services is enabled (default).

The following configures Nagios via Check_mk in an 'opt-in' method for service notifications using extra_service_conf in main.mk

The following section in main.mk will:
* Enable notifications for "IPMI Sensor Summary" to get temperature alerts
* Enable notifications for "fs_*" to get alerts for all file system disk usage
* Enable notifications for "Memory Used" for a specific server, server1
* Disabling all other service notifications


extra_service_conf["notifications_enabled"] = [
  ( "1", ALL_HOSTS, ["IPMI Sensor Summary","ambient_temp"]),
  ( "1", ALL_HOSTS, ["IPMI Sensor Summary","fs_*"]),
  ( "1", ["server1"], ["Memory Used"]),
  ( "0", ALL_HOSTS, ALL_SERVICES),
]

2 comments:

Emiel van Grinsven said...

Thanks for posting this! Just the info I needed.

Me! said...

Hi! would you know how to send notifications every X minutes depending on the services status (warning, unknown, critial)? Thanks