Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Variable Prefixes #10

Open
ryanhoskin opened this issue Mar 24, 2014 · 2 comments
Open

Environment Variable Prefixes #10

ryanhoskin opened this issue Mar 24, 2014 · 2 comments

Comments

@ryanhoskin
Copy link
Contributor

Take into account that Nagios wrappers like OMD and Check_MK will use different environment variable prefixes. Unfortunately, I don't have this information handy.

@ryanhoskin
Copy link
Contributor Author

NOTIFY is the prefix used by Check_MK

@ophirr
Copy link

ophirr commented Feb 23, 2015

line: 228
next unless $k =~ /^(NOTIFY|ICINGA|NAGIOS)_(.*)$/;

Note that some of the environmental variables for OMD are different than Nagios.

https://mathias-kettner.com/checkmk_flexible_notifications.html

SAMPLES:

NOTIFY_CONTACTEMAIL=[email protected]
NOTIFY_CONTACTNAME=ophir
NOTIFY_CONTACTPAGER=85e9673522fb27d36ff8228***_e7b56f808f6c7**_efceba0f8afd***6f
NOTIFY_DATE=2015-02-22
NOTIFY_HOSTADDRESS=172.2.13.16
NOTIFY_HOSTALIAS=chef-solo
NOTIFY_HOSTCHECKCOMMAND=check-mk-host-ping
NOTIFY_HOSTDOWNTIME=0
NOTIFY_HOSTNAME=chef-solo
NOTIFY_HOSTNOTIFICATIONNUMBER=0
NOTIFY_HOSTOUTPUT=OK - 172.2.13.16: rta 80.540ms, lost 0%
NOTIFY_HOSTPERFDATA=rta=80.540ms;200.000;500.000;0; pl=0%;40;80;; rtmax=80.585ms;;;; rtmin=80.491ms;;;;
NOTIFY_HOSTPROBLEMID=0
NOTIFY_HOSTSTATE=UP
NOTIFY_HOSTSTATEID=0
NOTIFY_HOSTTAGS=cmk-agent prod lan tcp wato /wato/
NOTIFY_HOSTURL=/check_mk/index.py?start_url=view.py%3Fview_name%3Dhoststatus%26host%3Dchef-solo
NOTIFY_HOST_EC_CONTACT=$_HOSTEC_CONTACT$
NOTIFY_HOST_SL=$_HOSTEC_SL$
NOTIFY_LASTHOSTSTATE=UP
NOTIFY_LASTHOSTSTATECHANGE=1424487918
NOTIFY_LASTHOSTSTATECHANGE_REL=1d 04:29:38
NOTIFY_LASTSERVICESTATE=CRITICAL
NOTIFY_LASTSERVICESTATECHANGE=1424590493
NOTIFY_LASTSERVICESTATECHANGE_REL=0d 00:00:03
NOTIFY_LOGDIR=/omd/sites/prod/var/check_mk/notify
NOTIFY_LONGDATETIME=Sun Feb 22 07:34:55 UTC 2015
NOTIFY_LONGHOSTOUTPUT=
NOTIFY_LONGSERVICEOUTPUT=
NOTIFY_MAIL_COMMAND=mail -s '$SUBJECT$' '$CONTACTEMAIL$'
NOTIFY_MONITORING_HOST=omd-dev
NOTIFY_NOTIFICATIONAUTHOR=
NOTIFY_NOTIFICATIONAUTHORALIAS=
NOTIFY_NOTIFICATIONAUTHORNAME=
NOTIFY_NOTIFICATIONCOMMENT=
NOTIFY_NOTIFICATIONTYPE=RECOVERY
NOTIFY_OMD_ROOT=/omd/sites/prod
NOTIFY_OMD_SITE=prod
NOTIFY_PARAMETERS=
NOTIFY_SERVICECHECKCOMMAND=check_mk_active-http! -I HOSTADDRESS
NOTIFY_SERVICEDESC=HTTP check http
NOTIFY_SERVICENOTIFICATIONNUMBER=2
NOTIFY_SERVICEOUTPUT=HTTP OK: HTTP/1.1 200 OK - 452 bytes in 0.166 second response time
NOTIFY_SERVICEPERFDATA=time=0.165881s;;;0.000000 size=452B;;;0
NOTIFY_SERVICEPROBLEMID=0
NOTIFY_SERVICESTATE=OK
NOTIFY_SERVICESTATEID=0
NOTIFY_SERVICEURL=/check_mk/index.py?start_url=view.py%3Fview_name%3Dservice%26host%3Dchef-solo%26service%3DHTTP%20check%20http
NOTIFY_SERVICE_EC_CONTACT=$_SERVICEEC_CONTACT$
NOTIFY_SERVICE_SL=$_SERVICEEC_SL$
NOTIFY_SHORTDATETIME=2015-02-22 07:34:55
NOTIFY_SVC_SL=$_SERVICEEC_SL$
NOTIFY_WHAT=SERVICE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants