12.6. Database changes/alterations
Prev | Chapter 12. IDOUtils | Next

## 12.6. Database changes/alterations

Change the instance name

You may have the need to change the instance name. There are some steps to be done which are described in this section. Thanks to ralfk who provided us with these instructions.

- Stop Icinga and ido2db daemons (since otherwise a new instance would automatically be added to DB instead of renaming it)

       #> /etc/init.d/icinga stop
       #> /etc/init.d/ido2db stop

- Change the instance name in `/usr/local/icinga/etc/idomod.cfg`

       instance_name=newinstance

- Change the instance name in the database table "icinga_instances" or "instances"

  MySQL/PostgreSQL

       SQL> UPDATE icinga_instances SET instance_name='NEWNAME' WHERE instance_name='OLDNAME';

  Oracle

       SQL> UPDATE instances SET instance_name='NEWNAME' WHERE instance_name='OLDNAME';

- Change the instance name in the command pipe configuration in one of these files (site file in first place)

  - `/usr/local/icinga-web/app/modules/Web/config/icinga-io.xml`

  - `/usr/local/icinga-web/app/modules/Web/config/icinga-io.site.xml`

- Clear the Web Cache

       #> /usr/local/icinga-web/bin/clearcache.sh

- Start Icinga and ido2db Daemons

       #> /etc/init.d/ido2db start
       #> /etc/init.d/icinga start

Prev | Up | Next
12.5. IDOUtils Database Model | Home | Index

© 2009-2013 Icinga Development Team, http://www.icinga.org