[omd-users] Alerting in OMD - howto?

Lander, Scott slander at hearstsc.com
Sat Jun 18 17:47:30 CEST 2011


You still need something similar to the old misccommands.cfg file, although you can move it and rename it to keep it in the check_mk spirit.

I have a file ~check_mk/etc/conf.d/serivicedefs.mk where I moved many of the things I need from nagios.cfg file to.  Main.mk is in ~check_mk/etc.   Anything in conf.d/*.mk will also get parsed.


Im posting my servicedefs.mk here.    Much of it probably isn't useful to you, but it might give some ideas of how to do things.....


cat service_definitons.mk


check_parameters += [
# day, hour, minute, second - force uptime alert default to anything under 30 minutes
        ( (0 , 0, 30, 0), ALL_HOSTS, [ "Uptime" ]),
]

extra_nagios_conf += r"""
###########################################################
# 'host-email-graph-int-en' command definition, sends
# multipart HTML e-mails in English w Nagios URL's & graphs
###########################################################
define command{
        command_name    host-email-graph-int-en
        command_line    /opt/hsc/pnp4n_send_host_mail.pl -p "Device: $HOSTNAME$" -f graph -u -r $CONTACTEMAIL$
}

define command{
        command_name    service-email-graph-int-en
        command_line    /opt/hsc/pnp4n_send_service_mail.pl -p "Device: $HOSTNAME$ -- Service: $SERVICEDESC$" -f graph -u -r $CONTACTEMAIL$
}
############################################################


define command {
        command_name                          check_snmp
        command_line                          $USER1$/check_snmp -H $HOSTADDRESS$ -o "$ARG2$" -r "$ARG3$" -l "$ARG4$" -C "$ARG1$"
}

define command {
                command_name                          check_snmp_alive
                command_line                          $USER1$/check_snmp_restart.pl $HOSTADDRESS$  '$ARG1$'
}

define command {
                command_name                          check_snmp_fw
                command_line                          $USER1$/checkpointfw_check.pl -H $HOSTADDRESS$ -C $USER9$ $ARG1$
}

"""

# because we have so many remote locations, 
# and our network can be very noisy at time
# Set number of tries before state goes hard to be fairly high
extra_service_conf["max_check_attempts"] = [
  ("5", ALL_HOSTS, "PING"),
  ("2", ALL_HOSTS, "Check_MK"),
  ("3", ALL_HOSTS, "QoS"),
  ("3", ALL_HOSTS, "df"),
  ("3", ALL_HOSTS, "Interface"),
  ("3", ALL_HOSTS, "Firewall"),
  ("5", ALL_HOSTS, "Average client signal quality"),
  ("3", ALL_HOSTS, "BGP"),
  ("3", ALL_HOSTS, "tcp_http"),
  ("5", ALL_HOSTS, "FAN"),
  ("2", ALL_HOSTS, ".*temperature"),
]

# Turn on processing perf data for host pings, for graphing
extra_service_conf["process_perf_data"] = [
  ("1", ALL_HOSTS, "PING"),
]

# Turn off notifications for some services
extra_service_conf["notifications_enabled"] = [
        ("0", ALL_HOSTS, "QoS"),
        ("0", ALL_HOSTS, "MAC CRC"),
        ("0", ALL_HOSTS, "Average client signal"),
]

# make ping command times longer
extra_service_conf["check_command"] = [ 
        ( "check-mk-ping!-w 750.0,20% -c 1250.0,40%", ALL_HOSTS, ["PING"] ), 
        ( "check-mk-host!-w 750.0,20% -c 1250.0,40%", ALL_HOSTS, ["PING"] ), 
] 


extra_host_conf["max_check_attempts"] = [ 
        ("6", ["sofaboxes"], ALL_HOSTS),
        ("5", ALL_HOSTS),
]



Hope this helps get you started.

Scott


-----Original Message-----
From: omd-users-bounces at lists.mathias-kettner.de [mailto:omd-users-bounces at lists.mathias-kettner.de] On Behalf Of Effrem Norwood
Sent: Saturday, June 18, 2011 10:04 AM
To: omd-users at lists.mathias-kettner.de
Subject: [omd-users] Alerting in OMD - howto?

After installing OMD, it is very unclear to us how to enable alerting in 
Nagios. The alerting service definitions that we would normally use seem 
to not be there. We'd like to use main.mk as much as possible and not go 
into old school Nagios unless necessary. Can someone please post some 
pointers on how to best do this in OMD?

Thanks in advance!

Effrem
_______________________________________________
omd-users mailing list
omd-users at lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/omd-users
------------------------------------------------------------------------------------
This e-mail message is intended only for the personal use of the recipient(s) named above. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify the Hearst Service Center (cadmin at hearstsc.com) immediately by email and delete the original message.
------------------------------------------------------------------------------------



More information about the omd-users mailing list