Distributed Monitoring - Slave Server Role, Wato Folder and Criticallity problem

Hello, I added on the Master/Main Site with Distributed Monitoring two slave sites. On the view “all hosts” the two slaves sites columns: “Server Role”, “Wato Folder” and “Criticallity” are not displaying correctly.
E.g. for some hosts the server role is not being read at all and only displaying N/A and for other is displaying incorrectly…the different wato folders and criticallity columns of the hosts from the slaves sites are being incorrectly taken from the main site.
On the respective slave sites itself and on the main site itself everything is displayed correctly and working as expected.
Both slave sites are backups from the master/main site that I restored without data and with new site names and are working as expected. On WATO I cannot find anything that would help me to identify these problems…it is possible that some very old initial configurations from the imported and restored configuration are interfering somehow and I need your help to be able to resolve this problem.
Thanks in advance for any input
Flo

Please don’t do this!!!

For a Slave site use every time a “blank” site and connect this site to the Master.

Why should be there a different configuration on the Master then the Slave?

To clarify your problem the following information is needed.

  • CMK version on your sites
  • how is the connection setup - real Master/Slave with central configuration or only Livestatus connection?

Hi Andreas, yes I understand. After the restore the whole configuration was the same, but after that, because they are on different sites and networks I changed some things and I expect to be different…in my case at least the Server Roles, the Wato Folders and the Criticallity.
The CMK version is the last stable 1.6.0p14 and the connection setup is only live status connection.
Thank you very much for any ideas
Florian

Then your behavior is completely correct.
No central configuration means that this is no master slave setup but a independent installation with only Livestatus communication.
Your “central” system with where you want to configure the view don’t know anything about the WATO folder structure on your other systems. This will only work if your system has central configuration as then every slave has the same folders and your central system knows all this.

Why is the behavior correct? The master must only read correctly the Server Roles, the Wato Folders and the Criticallity from the slaves as it is doing with all other data - it have to be only a read and display function nothing more and nothing less. It is reading and displaying many other information correctly but the Server Roles, the Wato Folders and the Criticallity and don’t understand why the master site insert on the slaves WATO Folders from master itself and/or from very old master configurations?!
How can I stop this? Thanks

The WATO folder are unknown to the “Master” if you don’t use a distributed configuration.
In your case also the “Criticality” is your own defined property and only known to the monitoring host where you configured this object.
If you want to display your own properties on a central system you have two options.

  • use real distributed monitoring with a central configuration
  • keep the same WATO folder structure and all the possible properties of a host in sync between all standalone configured systems

Most other things you see on your central “Master” are monitoring data and no configuration data like the Folder or Criticality.

Hi Andreas, I checked the configurations and the master seems to read correctly from the slaves the value “host_paths = {‘v7backup01’: ‘/wato/management/providername/hosts.mk’,…” It seems the slaves are not using the folder structure I already configured or I’m missing something. To test this I will change some of them and will check the configuration (/opt/omd/sites/monitoring/var/check_mk/base) again.
Thanks

It seems that on the slaves changing folder names, structure, paths and moving the hosts around does not change this path “/wato/management/…” and I presume that this word “management” is something old that I cant find/view nowhere on the GUI. Do you have any idea how/what to check?
Thank you

I said in my first post “Please don’t copy sites”. If you need the copy only to test something then it is ok but not for a setup like yours.
This is one reason. You cannot find easy what is wrong in your installation.
Second thing is again. If you want to have a real distributed setup please do a central configuration and not only a livestatus connection.

Hi Andreas, I created a host from scratch and it seems to be able to reproduce the behavior - it has nothing to do with backup and restore. This file seems to be updated only one time /opt/omd/sites/monitoring/var/check_mk/base/precompiled_check_config.mk.orig and there are the old folder names. Changing the folders names on WATO does not change them again on that file and from this file are coming the folder names from my slaves. Reload, recompile and other commands does not seems to update the host_paths on that file - do you have any idea how to update that?
Florian

This file generated every time you activate a change inside WATO. Take a look at the timestamp of this file.

This is correct behavior as the folder names shown inside WATO are only “descriptions” the real folder name is the name inside the filesystem. This is also the name you see inside this file.

A folder created at the first time as “/server/linux” and then renamed from inside WATO to “/server/unix” will stay “/server/linux” inside this file as it is in the filesystem.

OK I understand but I’m not a heavy linux user. Is any way to accomplish this little display “problem” or I have to create new folders and then to move all hosts?

In your situation i think, new folder and move the hosts would be the easiest way.

It seems to be the easiest and fastest way to do the trick, but with that the folder based checks and rules are gone :slight_smile:

That is also one of the many reasons to make a centralized configuration with replication to the slaves :slight_smile:

Ok, thanks so much Andreas for all your support and ideas - that helped me analyzing the situation further! For us is the wato folder important because it help us to identify easily the location of the host.
I will try tomorrow this approach: create the new folders, then move/apply the rules, move the hosts, check everything and then delete the empty folders - hopefully everything will work as expected.

OR Maybe on the slaves is possible to add a host custom attribute that can be automatically populated with the complete wato folder on the slave then be presented to the master as Host custom attribute?
What do you think?

Regards
Florian

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