ID: 0973
Title: Renaming of hosts via WATO
Component: WATO
Level: 2
Class: New Feature
Version: 1.2.5i3
WATO has now a new function <i>Rename Host</i>. You will find a button with
that name
in the Properties of a host. It allows a renaming of an existing host. Before you
can use that feature you need to have all changes activated, so nothing is pending.
Renaming a host is a complex precedure that will not only rename the host in WATO,
but also in:
<ul>
<li>all rules from <i>Host & Service Parameters</i></li>
<li>cluster's node definitions</li>
<li>a host's parent definitions</li>
<li>Business Intelligence rules</li>
<li>notification rules (both rule based and flexible notifications)</li>
<li>internal Check_MK data like caches and performance counters</li>
<li>auto-disovered services of the host</li>
<li>logfile information of logwatch plugin</li>
<li>stored SNMP walks</li>
<li>RR databases with performance data</li>
<li>RRD updates in journal of RRD Cache</li>
<li>spool files of PNP4Nagios</li>
<li>NagVis maps</li>
<li>monitoring history entries (events and availability)</li>
<li>the current monitoring state (including ackowledgements and
downtimes)</li>
</ul>
Please note that renaming of a host involves a temporary stop of the monitoring
core. This is neccessary in order to avoid situation where the old and the new
name of a host is being used at the same time.
Show replies by date
Hi,
a better way to tackle renaming issues is to *never* make use of user
defined names in rules, groups, folders, etc. and to do it as follows:
* For each new entity for which a user chooses a name, like hosts,
groups, folders, etc., also generate a permanent UUID. Then add an entry
to a mapping that maps between UUIDs and the names chosen by the user
and viceversa.
* Internally, in rules, folders, group, etc. which refer to named
entities, use only the UUIDs, *never* user chosen names.
* When presenting the internal structures to the user for reading or
modifying, map the UUIDs to the names and viceversa.
A rename then becomes a simple matter of updating the mapping between
the name and the UUID and does not require the complex operations you
describe.
Just to make it clear, this is not a new invention but it is a simple
application of well-known db engineering best practices.
Regards