0

I've been having a dupliate host problem with nagios3 and check_mk from the Jessie repos.

After installing and config nagios3, I added my web.cfg for nagios. I wanted to additional chekcs done by check_mk, so added the hosts to main.mk.

Then check_mk -I, -II and finally -U -U will generate the first check_mk_commands but it contains an "host" definition. If I remove it and cat check_mk_commands > web.cfg it has depenceies problems.

If I remove the host definition from my web.cfg of nagios, there is still the same problem: duplicate host entry in "web.cfg"

I checked cfg_dir and nothing is included twice.

I am doing the same thing @work and it works. Is there a way to tell check_mk not to do the host definition, I've spent 5 days of this.

Let me know if want some pasties, but I nailed the problem: check_mk does an host definition that is already in my nagios webserver monitoring configuration. Removing the definition from one or the other doesn't work. Even copyiing check_mk_commands.cfg without the host into my nagios3 config won't work due to missing templates.

Anyone encountered this problem ?

Please let me know, 6th day on this..

thms0
  • 494
  • 1
  • 7
  • 15

1 Answers1

1

/usr/share/check_mk/modules/config.py has a variable that's called 'generate_hostconf' which is True by default.

If you change this to False, check_mk will not generate the host_config.
EDIT: This should be done in main.mk or any conf.d/*.mk files since it's not nice to edit core files.

/etc/check_mk/conf.d/no_host_config.mk:

generate_hostconf = False
Ruben B
  • 11
  • 2
  • 1
    Setting ought to be made in the main.mk in that case since it's a global. modifying the core files is NOT supported/allowed. – Florian Heigl Mar 29 '17 at 11:52