Variables available for Checks

Dear all,

i sometimes lose track of things that i should know by heart. One of those things just came up again - it is the question of which variables i can use to make my rules more dynamic. Most of us have already used $HOSTNAME$, $HOSTALIAS$ or $HOSTADDRESS$.

I have a new colleague and he just asked me: “Hey, that $HOSTNAME$ thing is nice, can you give me a list of other available Variables?”

After thinking about it i noticed three things:

  1. I can create such a list dynamically by writing a notification script that outputs the $env variable to a file (Credits to @Doc and others)
  2. I can lookup old Nagios variables for example here: Standard Macros in Nagios
    but most prominently
  3. I can’t get a list in the GUI

Now for the sake of ll others out there that feel like me - wouldn’t it be nice to have something like that available in the UI? For admins?

What are your thoughts on this? :slight_smile:

3 Likes

Sounds good. You can find some of those informations in the help if you click on the little book in the upper right corner. But you are right. Something “central” would be nice. Or something like a button “show all here available variables”. In the end i would like to use ALL variables EVERYWHERE. Also custom variables.

2 Likes

The variables available to notification plugins, alert handlers and active checks (as macros for the command line) differ. They are not the same.
There are many parts of checkmk that are not as documented as one would wish…

3 Likes

True - that however is something that can be remedied.
It is work that doesn’t yield funky new features but it is work well invested as otherwise, people could get problems in audits and that in the end would be bad for the business.

All Partners seem to have a pretty good understanding of the software as a whole - the challenge is to streamline the most central parts into something better.

Maybe Tribe sees this :wink:

1 Like

Here variables available for notifications are documented https://checkmk.com/cms_notifications.html (11.4)

I would like more variables i could use in a notification : you can setup Notes url for hosts and services, it would be usefull to send them in a notification.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.