/usr/share/check_mk/notifications/mkeventd is in check-mk-server 1.2.6p12-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash
# Forward Notification to Event Console
# This notification plugin sends a notification to the
# Check_MK Event Console. It takes two parameters:
# 1. Syslog facility to use. This must be a number
# from 0 to 23. 16 means 'local0', 17 means 'local1',
# ... and 23 means 'local7'. If you leave this empty
# the local0 is being used.
# 2. IP-Address of the remote Event Console. If you
# do not leave this empty then the notifications are
# being sent via syslog/UDP (port 514) to that address.
# Default values
FACILITY=16
REMOTE=""
# Old-style parameters
if [ "$NOTIFY_PARAMETER_1" ] ; then FACILITY="${NOTIFY_PARAMETER_1}" ; fi
if [ "$NOTIFY_PARAMETER_2" ] ; then REMOTE="${NOTIFY_PARAMETER_2}" ; fi
# New-style parameters
if [ -n "$NOTIFY_PARAMETER_FACILITY" ] ; then FACILITY="${NOTIFY_PARAMETER_FACILITY}" ; fi
if [ -n "$NOTIFY_PARAMETER_REMOTE" ] ; then REMOTE="${NOTIFY_PARAMETER_REMOTE}" ; fi
if [ "$NOTIFY_WHAT" = HOST ]
then
mkevent -n "$FACILITY" "$REMOTE" $NOTIFY_HOSTSTATEID "$NOTIFY_HOSTNAME" "" "$NOTIFY_HOSTOUTPUT" "$NOTIFY_HOST_SL" "$NOTIFY_HOST_EC_CONTACT"
else
mkevent -n "$FACILITY" "$REMOTE" $NOTIFY_SERVICESTATEID "$NOTIFY_HOSTNAME" "$NOTIFY_SERVICEDESC" "$NOTIFY_SERVICEOUTPUT" "$NOTIFY_SERVICE_SL" "$NOTIFY_SERVICE_EC_CONTACT" "$NOTIFY_HOST_SL" "$NOTIFY_HOST_EC_CONTACT"
fi
|