1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>12.6. Database changes/alterations</title>
<link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.14 Documentation">
<link rel="up" href="ch12.html" title="Chapter 12. IDOUtils">
<link rel="prev" href="db_model.html" title="12.5. IDOUtils Database Model">
<link rel="next" href="ch13.html" title="Chapter 13. Icinga Samples">
<script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">12.6. Database changes/alterations</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="db_model.html">Prev</a> </td>
<th width="60%" align="center">Chapter 12. IDOUtils</th>
<td width="20%" align="right"> <a accesskey="n" href="ch13.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="12.6. Database changes/alterations">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="db_changes"></a>12.6. Database changes/alterations</h2></div></div></div>
<p><a name="db_changes-instancename"></a> <span class="bold"><strong>Change the instance name</strong></span></p>
<p>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
<a class="link" href="https://dev.icinga.org/users/210" target="_top">ralfk</a> who provided us with these instructions.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>Stop Icinga and ido2db daemons (since otherwise a new instance would automatically be added to DB instead of renaming
it)</p>
<pre class="programlisting"> #> /etc/init.d/icinga stop
#> /etc/init.d/ido2db stop</pre>
</li>
<li class="listitem">
<p>Change the instance name in <code class="filename">/usr/local/icinga/etc/idomod.cfg</code> </p>
<pre class="programlisting"> instance_name=newinstance</pre>
</li>
<li class="listitem">
<p>Change the instance name in the database table "icinga_instances" or "instances"</p>
<p><span class="bold"><strong>MySQL/PostgreSQL</strong></span></p>
<pre class="programlisting"> SQL> UPDATE icinga_instances SET instance_name='NEWNAME' WHERE instance_name='OLDNAME';</pre>
<p><span class="bold"><strong>Oracle</strong></span></p>
<pre class="programlisting"> SQL> UPDATE instances SET instance_name='NEWNAME' WHERE instance_name='OLDNAME';</pre>
</li>
<li class="listitem">
<p>Change the instance name in the command pipe configuration in one of these files (upgrade safe file in first place)</p>
<div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
<p><code class="filename">./etc/conf.d/access.xml</code></p>
</li>
<li class="listitem">
<p><code class="filename">./app/modules/Api/config/access.xml</code></p>
</li>
</ul></div>
</li>
<li class="listitem">
<p>Clear the Web Cache</p>
<pre class="programlisting"> #> /usr/local/icinga-web/bin/clearcache.sh</pre>
</li>
<li class="listitem">
<p>Start Icinga and ido2db Daemons</p>
<pre class="programlisting"> #> /etc/init.d/ido2db start
#> /etc/init.d/icinga start</pre>
</li>
</ul></div>
<a class="indexterm" name="idm140381618693984"></a>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="db_model.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch12.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="ch13.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">12.5. IDOUtils Database Model </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Chapter 13. Icinga Samples</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|