I am making a script to exchange nagios macros with CheckMK environment variables. That is, a kind of dictionary where calling $HOSTNAME$ gives me the value of $NOTIFY_HOSTNAME$.
I need to get the complete list of environment variables. I have tried to use the foobar.sh script but it doesn’t work, it doesn’t write anything to the .out file (although in checkmk I see that the notification matches and it supposedly runs fine, and the permissions are also correct).
In Setup | Services | Service monitoring rules | Parameters for HTML Email there is an option to enable complete variable list (for testing)
Next notification mail that is sent, you get a big list with all the variables inside.
A while ago I had it enabled on my 2.1.0p5 raw server and it gave these variables:
Do you know if this variables are available appending a “NOTIFY_” string at the beggining?
I’m interested in ENV variables starting with NOTIFY_ to use them in notifications scripts.
No, I don’t know which variables are available where. I just found out while using some, that they were not available everywhere. Would be nice if this was documented somewhere.
@alz0 most important variables are listed in the documentation, section 11.5 I think.
Alternatively you can write a dummy script like in 11.4 and then you can write all variables to a file. Then you will see the variables after they are dumped into the file.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.