1 Title: Add all custom variables of host, service and contact to notification
9 The CMC now automatically adds all custom variables of hosts, service and
10 contacts to the notification context. The variable name is prefixed with
11 the word <tt>HOST</tt>, <tt>SERVICE</tt> or <tt>CUSTOM</tt> and - as its
12 variable name custom - converted to upper case. So a host variable with
13 the name <tt>_foobar</tt> will be available as <tt>HOST_FOOBAR</tt> in the
14 notification context. The names will be prefixed with <tt>NOTIFY_</tt> and put
15 into the environment of the notification plugin. So at the end the variable
16 will be available as <tt>NOTIFY_HOST_FOOBAR</tt>, e.g. in a shell script:
19 echo "Foobar: $NOTIFY_HOST_FOOBAR"
24 <li>In the configuration files in <tt>main.mk</tt> or below <tt>conf.d</tt>
25 the variables can be set via <tt>extra_host_conf</tt> or <tt>extra_service_conf</tt>.
26 You need to have the variable names begin with an underscore. So a variable name of <tt>foobar</tt>
27 is not allowed. You have to write either <tt>_foobar</tt> or <tt>_FOOBAR</tt>.</li>
28 <li>When you add contact custom variables via WATO (button <i>Custom Attributes</i>
29 in the users management</i>) the underscore will <i>automatically</i> be added.</li>
30 <li>when using Nagios as monitoring core you have to adapt <tt>check_mk_templates.cfg</tt>
31 whenever you add a new custom variable.</li>