Director commands that show scripts in preview

Hello,

I took over Icinga2 from a former colleague and I’m struggeling with some things.

We have several commands that when looked at the preview you can see there is a script, like:

I found the commands.conf, that includes that script here:
/var/lib/icinga2/api/zones/windows-commands/director/commands.conf (windows-commands is one of our global zones)

But of course I can not add anything here. If I do so, the info is never shown in the Director and after an Icinga reload, or after a Director config deployment the file is clean of my changes.

So my guess is that I have to import a new script somehow, so it gets added to the mentioned commands.conf. Is that the case? And if so how do I do that?

Thanks for your input and best regards
Andre

  • Director version: 1.8.0
  • Icinga Web 2 version and modules: 2.8.2
  • Icinga 2 version: 2.12.4-1
  • Operating System and version: Ubuntu 18.04.1

A command is one defined in the Director opposite to a external command that would be imported from a running Icinga 2 instance.

So if you want to keep how the configuration was done, you would need to create the command in the director, then add the arguments and fields.

If you want to change the workflow, you would need to create the commands in a file located at /etc/icinga2/zones.d/windows-commands/ on your configuration master, then reload the configuration and run an import in the Director.

1 Like

Thank you very much! :+1:

That did it for me. I knew about fileds, but I don’t know why I never checked the arguments tab.
I did so for an excisting command and was now able to create a new one the same way.

Thanks again an BR
Andre