Error: Object 'ido' of type 'CheckCommand' re-defined

Hello everyone,
I setup my first icinga2 server with icingaweb2 and the director.
I played with several settings, checks, services to learn how to use icinga2. On the director I get the following error if I try to deplay my rendered config.

[2021-02-12 17:38:49 +0000] information/cli: Icinga application loader (version: r2.12.3-1)
[2021-02-12 17:38:49 +0000] information/cli: Loading configuration file(s).
[2021-02-12 17:38:49 +0000] critical/config: Error: Object ‘ido’ of type ‘CheckCommand’ re-defined: in /var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf: 1:0-1:24; previous definition: in db_ido-itl.conf: 8:2-8:26
Location: in /var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf: 1:0-1:24
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(1): object CheckCommand “ido” {
^^^^^^^^^^^^^^^^^^^^^^^^^
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(2): import “plugin-check-command”
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(3): command = [ PluginDir + “/ido” ]

[2021-02-12 17:38:49 +0000] critical/cli: Config validation failed. Re-run with ‘icinga2 daemon -C’ after fixing the config.

I searched for the db_ido-itl.conf file but didn’t find it. Maybe I’m looking on the wrong file?!
Any hints or suggestions are welcome. I’m stuck with this issue :slight_smile: .

System information:
Platform: Ubuntu
Platform version: 20.04.2 LTS (Focal Fossa)
Kernel: Linux
Kernel version: 5.4.0-42-generic
Architecture: x86_64

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

Disabled features: command compatlog debuglog elasticsearch gelf graphite icingadb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker ido-mysql influxdb mainlog notification

Hi @Br3wCe, Welcome to the Icinga Community.

Since the IDO is HA aware, there is a built-in CheckCommand for it whose name you can’t change because the CheckCommand is being generated at runtime. For fixing your problem you have to name the newly created CheckCommand in the Director other than ido.

Hi Yonas,

thank you very much for your reply. I never did a CheckCommand named ido. If I think back, I was trying to import my predifined commands created without the director over “Automation”. I used “Import Source” “Core API” “Check Commands” and “Sync Rule” “Object Type: Command” “Update Policy: Merge” and “Purge: No”.

Was this maybe my failure?

If I delete the IDO command out of the Director commands.conf I’m getting a new error. Rinse and repeat :wink:

How can i cleanup my mess? In my “Activity log” I’ve got a lot of “[icingaweb] modify command “check command””.

Thanks a lot for your help!

Oh, I see. How did you create your predefined CheckCommands? Are they randomly generated or do you import them from a database?

If you remove the checkCommand from yourHost/icingaweb2/director/commands#!/icingaweb2/director/command?name=ido and press deploy pending changes, it should work again but what kind of error did you get afterwards?

Good mording Yonas,

I imported and synced the standard commands like ping, hostalive, load, mem and so on.
After I delete the ido out of director commands, the next command is throwing an error.

critical/config: Error: Object ‘vmware-esx-soap-host-runtime-con’ of type ‘CheckCommand’ re-defined: in /var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf: 1:0-1:53; previous definition: in /usr/share/icinga2/include/plugins-contrib.d/vmware.conf: 680:1-680:54
Location: in /var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf: 1:0-1:53
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(1): object CheckCommand “vmware-esx-soap-host-runtime-con” {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(2): import “plugin-check-command”
/var/lib/icinga2/api/packages/director/e9ad6065-aead-460c-b3d1-9e499c1564ca/zones.d/director-global/commands.conf(3): command = [ PluginDir + “/vmware-esx-soap-host-runtime-con” ]