Computer and IT knowledge - things to know
checkmk notification - how to find out all notification variables?
How to find out all possible variables, that can be use?
Global settings > Notifications > Notification log level >> set to "Full dump of all varibales and commands"
#now "produce" a notification and what the notifiy.log using on console:
OMD[sitename ]:~/var/log$ tail -f notify.log
>> you will now see variables like this: (from checkmk version 2.1)
CONTACTS=contact1,contact2,contact3
HOSTACKAUTHOR=
HOSTACKCOMMENT=
HOSTADDRESS=192.168.8.65
HOSTALIAS=test device mysite-switch1
HOSTATTEMPT=1
HOSTCHECKCOMMAND=check-mk-host-ping
HOSTCONTACTGROUPNAMES=all
HOSTDOWNTIME=0
HOSTGROUPNAMES=check_mk
HOSTNAME=test
HOSTNOTES=
HOSTNOTESURL=
HOSTNOTIFICATIONNUMBER=0
HOSTOUTPUT=OK - 192.168.8.65: rta 0.792ms, lost 0%
HOSTPERFDATA=rta=0.792ms;200.000;500.000;0; pl=0%;80;100;; rtmax=0.877ms;;;; rtmin=0.733ms;;;;
HOSTPROBLEMID=41170
HOSTSTATE=UP
HOSTSTATEID=0
HOSTTAGS=/wato/ auto-piggyback default ip-v4 ip-v4-only lan no-agent prod site:mysite snmp snmp-v2 unknown
HOST_ADDRESSES_4=
HOST_ADDRESSES_6=
HOST_ADDRESS_4=192.168.8.65
HOST_ADDRESS_6=
HOST_ADDRESS_FAMILY=4
HOST_EC_CONTACT=
HOST_FILENAME=/wato/hosts.mk
HOST_SL=
HOST_TAGS=/wato/ auto-piggyback default ip-v4 ip-v4-only lan no-agent prod site:mysite snmp snmp-v2 unknown
LASTHOSTPROBLEMID=41170
LASTHOSTSTATE=UP
LASTHOSTSTATECHANGE=1691416167
LASTHOSTSTATEID=0
LASTHOSTUP=1691475116
LASTSERVICEOK=1691475151
LASTSERVICEPROBLEMID=42110
LASTSERVICESTATE=CRITICAL
LASTSERVICESTATECHANGE=1691475151
LASTSERVICESTATEID=2
LONGHOSTOUTPUT=
LONGSERVICEOUTPUT=Total CPU: 1.0%
MAXHOSTATTEMPTS=1
MAXSERVICEATTEMPTS=1
MICROTIME=1691475151864063
NOTIFICATIONAUTHOR=
NOTIFICATIONAUTHORALIAS=
NOTIFICATIONAUTHORNAME=
NOTIFICATIONCOMMENT=
NOTIFICATIONTYPE=RECOVERY
PREVIOUSHOSTHARDSTATE=DOWN
PREVIOUSHOSTHARDSTATEID=1
PREVIOUSSERVICEHARDSTATE=CRITICAL
PREVIOUSSERVICEHARDSTATEID=2
SERVICEACKAUTHOR=
SERVICEACKCOMMENT=
SERVICEATTEMPT=1
SERVICECHECKCOMMAND=check_mk-hp_procurve_cpu
SERVICECONTACTGROUPNAMES=all
SERVICEDESC=CPU utilization
SERVICEDISPLAYNAME=CPU utilization
SERVICEDOWNTIME=0
SERVICEGROUPNAMES=
SERVICENOTES=
SERVICENOTESURL=
SERVICENOTIFICATIONNUMBER=1
SERVICEOUTPUT=Total CPU: 1.0%
SERVICEPERFDATA=util=1;80;90;0;100
SERVICEPROBLEMID=42110
SERVICESTATE=OK
SERVICESTATEID=0
SERVICE_EC_CONTACT=
SERVICE_SL=
SVC_SL=
CONTACTNAME=check-mk-notify
DATE=2023-08-08
HOSTFORURL=test
HOSTLABEL_cmk/device_type=switch
HOSTLABEL_cmk/site=mysite
HOSTSHORTSTATE=UP
HOSTURL=/check_mk/index.py?start_url=view.py?view_name%3Dhoststatus%26host%3Dtest%26site%3Dmysite
LASTHOSTSHORTSTATE=UP
LASTHOSTSTATECHANGE_REL=0d 16:23:04
LASTHOSTUP_REL=0d 00:00:35
LASTSERVICEOK_REL=0d 00:00:00
LASTSERVICESHORTSTATE=CRIT
LASTSERVICESTATECHANGE_REL=0d 00:00:00
LONGDATETIME=Tue Aug 08 08:12:31 CEST 2023
MONITORING_HOST=mysitecheckmk-vm.mysite
OMD_ROOT=/omd/sites/mysite
OMD_SITE=mysite
PREVIOUSHOSTHARDSHORTSTATE=DOWN
PREVIOUSSERVICEHARDSHORTSTATE=CRIT
SERVICEFORURL=CPU%20utilization
SERVICESHORTSTATE=OK SERVICEURL=/check_mk/index.py?start_url=view.py?view_name%3Dservice%26host%3Dtest%26service%3DCPU%2Butilization%26site%3Dmysite
SHORTDATETIME=2023-08-08 08:12:31
WHAT=SERVICE
computer2know :: thank you for your visit :: have a nice day :: © 2024