Menu

Setup Icinga Monitoring Tool on CentOS 7 / RHEL 7
Icinga is an open source computer system and network monitoring application. It was originally created as a fork of the Nagios system monitoring application in 2009.

Icinga is attempting to get past perceived short-comings in Nagios' development process, as well as adding new features such as a modern Web 2.0 style user interface, additional database connectors (for MySQL, Oracle, and PostgreSQL), and a REST API that lets administrators integrate numerous extensions without complicated modification of the Icinga core.
Before we go ahead, lets install the required packages for Icinga.

# yum -y install wget httpd mod_ssl gd gd-devel mariadb-server php-mysql php-xmlrpc gcc mariadb libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql
Disable SELinux.

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
Reboot once done.

Create icinga user and icinga-cmd group (allowing the external commands to be executed through the web interface) , add  icinga and apache user to the part of icinga-cmd group.

# useradd icinga
# groupadd icinga-cmd
# usermod -a -G icinga-cmd icinga
# usermod -a -G icinga-cmd apache
Download latest Icinga source tarball.

# cd /tmp/
# wget http://downloads.sourceforge.net/project/icinga/icinga/1.10.1/icinga-1.10.1.tar.gz
# tar -zxvf /tmp/icinga-1.10.1.tar.gz
# cd /tmp/icinga-1.10.1
Compile and Install Icinga:

# ./configure --with-command-group=icinga-cmd --enable-idoutils
# make all
# make install
# make install-init
# make install-config
# make install-commandmode
# make install-webconf
# make install-idoutils
Configure Icinga:

Sample configuration files have now been installed in the /usr/local/icinga/etc/ directory. These sample files should work fine for getting started with Icinga. You’ll need to make just one change before you proceed. Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you’d like to use for receiving alerts.

# vi /usr/local/icinga/etc/objects/contacts.cfg
Change the Email address field to receive the notification.

email                           icinga@localhost
to

email                           icinga@hackthesec.co.in
Move sample idoutils configuration files to Icinga base directory.

# cd /usr/local/icinga/etc/
# mv idomod.cfg-sample idomod.cfg
# mv ido2db.cfg-sample ido2db.cfg
# cd modules/
# mv idoutils.cfg-sample idoutils.cfg
Create database for idoutils:

# systemctl start mariadb.service
# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE icinga;
MariaDB [(none)]> GRANT USAGE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> quit
Import Database.

# mysql -u root -p icinga < /tmp/icinga 1.10.1/module/idoutils/db/mysql/mysql.sql
Configure Web Interface:

Create a icingaadmin account for logging into the Icinga web interface. Remember the password that you assign to this user – you’ll need it later.

# htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
Restart Apache to make the new settings take effect.

systemctl restart httpd.service
Download and Install Nagios Plugins:

Download Nagios Plugins to /tmp directory.

# cd /tmp
# wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
# tar -zxvf /tmp/nagios-plugins-2.0.3.tar.gz
# cd /tmp/nagios-plugins-2.0.3/
Compile and install the plugins.

# ./configure --prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin --with-nagios-user=icinga --with-nagios-group=icinga
# make
# make install
Starting Icinga:

Verify the sample Icinga configuration files.

# /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
If there are no errors, start Nagios and Idoutils.

# /etc/init.d/icinga start
# /etc/init.d/ido2db start
Start Icinga and Idoutils on system startup.

# chkconfig ido2db on
# chkconfig icinga on
# systemctl enable httpd.service
# systemctl enable mariadb.service
Access Web Interface:

Now access Icinga web interface using the following URL. You'll be prompted for the username (icingaadmin) and password you specified earlier.

www.hackthesec.co.in


About Author:


I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Next
Newer Post
Previous
Older Post

21 comments:

  1. Great material, Thanks a lot.

    ReplyDelete
  2. These are really great ideas in about blogging.
    You have touched some good points here. Any way keep
    up wrinting.

    ReplyDelete
  3. I am truly grateful to the owner of this web page who has shared this fantastic post at at this
    time.

    ReplyDelete
  4. It's going to be end of mine day, however before
    end I am reading this great article to improve my knowledge.

    ReplyDelete
  5. Your method of telling everything in this piece of writing is in fact fastidious, all be capable of effortlessly be
    aware of it, Thanks a lot.

    ReplyDelete
  6. Good day! I could have sworn I've been to this blog before but after reading through some of the post I
    realized it's new to me. Anyhow, I'm definitely happy I found it and I'll
    be bookmarking and checking back frequently!

    ReplyDelete
  7. My spouse and i ended up being absolutely comfortable when John managed to
    complete his homework while using the precious recommendations he received out of your weblog.
    It's not at all simplistic to just happen to be giving away techniques which usually other
    folks could have been trying to sell. And we also take into account we have got the blog owner to be grateful to because of that.
    The illustrations you've made, the straightforward website menu, the friendships you aid to instill - it
    is all fantastic, and it's really making our son in addition to
    the family feel that the content is enjoyable, which is truly fundamental.
    Thanks for the whole lot!

    ReplyDelete
  8. I visited multiple websites but the audio quality for audio songs present
    at this website is actually excellent.

    ReplyDelete
  9. Wonderful beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog site?
    The account helped me a acceptable deal. I had been a little
    bit acquainted of this your broadcast offered bright clear idea

    ReplyDelete
  10. If some one wants to be updated with most up-to-date technologies then he must be pay a visit this site and be up
    to date daily.

    ReplyDelete
  11. Hello, I enjoy reading all of your post. I wanted to
    write a little comment to support you.

    ReplyDelete
  12. I got what you mean, regards for posting. Woh I am pleased to
    find this website through google.

    ReplyDelete
  13. I really like assembling useful information, this post has got me even more
    info!

    ReplyDelete
  14. I am not real great with English but I get hold
    this really easygoing to understand.

    ReplyDelete
  15. I don't know whether it's just me or if perhaps everybody else experiencing problems with your website.
    It appears like some of the text on your posts are running off the screen. Can someone else please comment and let me know if this is happening to them as
    well? This might be a problem with my browser because I've had this happen before.
    Thanks

    ReplyDelete
  16. I was curious if you ever considered changing the layout of your blog?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content
    so people could connect with it better. Youve got an awful lot
    of text for only having 1 or 2 pictures. Maybe you could space it out better?

    ReplyDelete
  17. Regards for this wondrous post, I am glad I observed
    this internet site on yahoo.

    ReplyDelete
  18. Thanks for a marvelous posting! I definitely enjoyed reading
    it, you might be a great author. I will be sure to bookmark your blog and will eventually come back
    later in life. I want to encourage yourself to
    continue your great job, have a nice evening!

    ReplyDelete
  19. I am really enjoying the theme/design of your web site.

    Do you ever run into any web browser compatibility issues?
    A small number of my blog visitors have complained about my site not working correctly in Explorer but looks
    great in Firefox. Do you have any suggestions to help fix this issue?

    ReplyDelete
  20. Hi there, just became alert to your blog through Google,
    and found that it is truly informative. I?m gonna watch out for brussels.

    I will be grateful if you continue this in future. Numerous people will be benefited from your writing.
    Cheers!

    ReplyDelete
  21. I am not rattling fantastic with English but I come up this very easy to understand.

    ReplyDelete

 
Top