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 (upgrade safe file in first place)

  - `./etc/conf.d/access.xml`

  - `./app/modules/Api/config/access.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 | Chapter 13. Icinga Samples

© 1999-2009 Ethan Galstad, 2009-2014 Icinga Development Team, http://www.icinga.org