Extenal command check_mysql has no field available for mysql_ignore_auth

I am a long-term user of icinga and have recently started migrating to icinga2 and using the director.
I am using the check_mysql which got automatically imported (=external command) into director. I want to use it with the -n parameter, so that it only checks the connection to mysql server but doesn’t authenticate.
I haven’t found a way to apply the -n parameter via director as there is no field for it.
If I look at the imported check command it looks like in the screenshot below. Unfortunately in the fields list I cannot select the $mysql_ignore_auth$ variable. As none of the “set-if” variables is listed in the fields dropdown, I assume I have to set it somehow/somewhere else. I haven’t found anything in the documentation, or maybe I looked at the wrong places. Thanks.

In this case Director is lacking a bit of a feature. It only provides string fields for suggestion, not for boolean. So simply navigate to Datafields and create it there, then go back to your command or service and add the field.

Thanks @dgoetz for your Feedback.
Not sure if I understand you right how to add the field? As you see in the screenshot in my 1st post, the service is an external command (from my local default ubuntu icinga configuration) and I don’t see a way how to add additional fields? e.g.


Do I need to clone the command and adapt the clone? Or shall I modify the local configuration files provided by the Ubuntu package?

I have cloned the command and when I check the fields of the command, I can see the “-n” parameter with the “Condition (set if)” populated with the value from the original config:


Maybe I do not understand the concept and how to set/trigger the condition from a service template/config?

No need to clone it, when you open the director’s overview page there is a menu item “Datafields” on the bottom. There you can manually create datafields. In this case it has to match the attributes’s name “mysql_ignore_auth” and as value type “boolean”. When the datafield exists, you can select it from the dropdown list in this view.

1 Like

@dgoetz Thank you very much!!! I had not seen the Datafields in the menu because I only saw the sub-menus in the navigation pane on the left and didn’t realize there is more than what is shown in the navigation pane :slight_smile:
I have set the mysql_ignore_auth field as boolean to yes via data field and service set and it works as expected. Perfect!