Changes

From Amahi Wiki
Jump to: navigation, search
14 bytes added ,  16:02, 17 July 2018
== Compile and install Icinga with IDOUtils ==
Create an icinga user, icinga-cmd group, and add the apache user and icinga user to the icinga-cmd group.
{{Code|<pre>
useradd -m icinga
groupadd icinga-cmd
usermod -a -G icinga-cmd icinga
usermod -a -G icinga-cmd apache}}</pre>
Now lets do some compiling.
{{Code|<pre>
cd /usr/local/src/
tar -xzf icinga-1.4.2.tar.gz
make all
make fullinstall
}}</pre>
Edit the ''/usr/local/icinga/etc/objects/contacts.cfg'' config file with your favorite editor and change the email address associated with the icingaadmin contact definition to the address you'd like to use for receiving alerts.
{{Code|<pre>
vim /usr/local/icinga/etc/objects/contacts.cfg
cp /usr/local/icinga/etc/ido2db.cfg-sample /usr/local/icinga/etc/ido2db.cfg
cp /usr/local/icinga/etc/idomod.cfg-sample /usr/local/icinga/etc/idomod.cfg
cp /usr/local/icinga/etc/modules/idoutils.cfg-sample /usr/local/icinga/etc/modules/idoutils.cfg}}</pre>
Create the icinga db/user/pass for IDOUtils to use and import the mysql database (you should still be in ''/usr/local/src/icinga-1.4.2'' working directory).
{{Code|<pre>hda-create-db-and-user icingamysql -u icinga -picinga icinga < module/idoutils/db/mysql/mysql.sql}}</pre>
Configure the password for the icinga directory.
{{Code|<pre>htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin}}</pre>
Configure the Apache config located in ''/etc/httpd/conf.d/''
{{Code|<pre>
ls /etc/httpd/conf.d/ <nowiki>|</nowiki> grep icinga
#you should see two files. Something like 1002-icinga.conf and icinga.conf
#and move </VirtualHost> from the middle of the file to the end.
#be sure to confirm that the contents of icinga.conf are within 1002-icinga.conf before removing it
rm -f /etc/httpd/conf.d/icinga.conf}}</pre>
Start icinga, idoutils and restart the apache server.
{{Code|<pre>service icinga start
service ido2db start
service httpd restart}}</pre>
Visit http://icinga and make sure that it is currently working.
12,424

edits