icinga v17 en
TRANSCRIPT
-
8/18/2019 Icinga v17 En
1/727
Icinga Version 1.7 Documentation
Next
Icinga Version 1.7 Documentation
Copyright 2009-2012 Icinga Development Team.
Portions copyright © by Nagios/Icinga community members - see the THANKS file in theIcinga core sources for more information..
Credits to Yoann LAMY for creating the Vautour Style we use for the Icinga Classic UI
Icinga is licensed under the terms of the GNU General Public License Version 2 as published bythe Free Software Foundation. This gives you legal permission to copy, distribute and/ormodify Icinga under certain conditions. Read the ’LICENSE’ file in the Icinga distribution orread the online version of the license for more details.
Icinga is provided “AS IS” with “NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULARPURPOSE.”
Nagios is licensed under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation. This gives you legal permission to copy, distribute and/ormodify Nagios under certain conditions. Read the ’LICENSE’ file in the Nagios distribution orread the online version of the license for more details.
Nagios and the Nagios logo are registered trademarks of Ethan Galstad. All other trademarks,servicemarks, registered trademarks, and registered servicemarks mentioned herein may be theproperty of their respective owner(s). The information contained herein is provided “AS IS”with “NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.”
2012.05.15
1
Icinga Version 1.7 Documentation
-
8/18/2019 Icinga v17 En
2/727
Revision History
Revision 1.7 2012-05-15
1.7 Icinga Documentation
Revision 1.x 2010/2011
1.x Icinga Documentation
Revision 0.1 2009-08-12
First Release
Table of Contents
1. About About Icinga
What’s New in Icinga 1.72. Getting Started Advice for beginners Quickstart Installation Guides Icinga Quickstart Icinga Quickstart FreeBSD Icinga with IDOUtils Quickstart Icinga and IDOUtils Quickstart on FreeBSD Links to other published Howtos Upgrading (to) Icinga Upgrading IDOUtils Database Monitoring Overview Monitoring Windows Machines Monitoring Linux/Unix Machines Monitoring Netware Servers Monitoring Network Printers Monitoring Routers and Switches Monitoring Publicly Available Services
3. Configuring Icinga Configuration Overview Main Configuration File Options Object Configuration Overview Object Definitions
Host definition Hostgroup Definition Service Definition Servicegroup Definition Contact Definition Contactgroup Definition Timeperiod Definition Command Definition Servicedependency Definition Serviceescalation Definition Hostdependency Definition
Hostescalation Definition Hostextinfo Definition
2
Icinga Version 1.7 Documentation
-
8/18/2019 Icinga v17 En
3/727
Serviceextinfo Definition Module Definition
Custom Object Variables CGI Configuration File Options Authentication And Authorization In The CGIs
4. Running Icinga
Verifying Your Configuration Starting and Stopping Icinga
5. The Basics Icinga Plugins Understanding Macros and How They Work Standard Macros in Icinga Host Checks Service Checks Active Checks Passive Checks State Types
Time Periods Determining Status and Reachability of Network Hosts Notifications Notifications: Examples and troubleshooting
6. User Interfaces Icinga Classic UI: Information On The CGIs Information On CGI parameters Executing CGIs on the command line Installation of the Icinga-Web Frontend Upgrading Icinga-Web and Icinga-Web Database Configuration Overview of Icinga-Web Introduction to Icinga-Web
Introduction to Icinga-Web (>= 1.7.x)Integration of PNP4Nagios into Icinga-Web
7. Advanced Topics External Commands Event Handlers Volatile Services Service and Host Freshness Checks Distributed Monitoring Redundant and Failover Network Monitoring Detection and Handling of State Flapping Notification Escalations
Escalation Condition On-Call Rotations Monitoring Service and Host Clusters Host and Service Dependencies State Stalking Performance Data Scheduled Downtime Recurring Downtimes Using The Embedded Perl Interpreter Adaptive Monitoring Predictive Dependency Checks
Cached Checks Passive Host State Translation
3
Icinga Version 1.7 Documentation
-
8/18/2019 Icinga v17 En
4/727
Service and Host Check Scheduling Custom CGI Headers and Footers Modified attributes Object Inheritance Time-Saving Tricks For Object Definitions
8. Security and Performance Tuning
Security Considerations Enhanced CGI Security and Authentication Tuning Icinga For Maximum Performance Fast Startup Options Large Installation Tweaks Using The Icingastats Utility Graphing Performance Info With PNP4Nagios Temporary Data
9. Integration With Other Software Integration Overview SNMP Trap Integration
TCP Wrapper Integration MKLiveStatus Integration Installation of the Icinga-Reporting with JasperServer
10. Additional software Icinga Addons NRPE NSCA
11. Development Icinga Plugin API Developing Plugins For Use With Embedded Perl List of External Commands No Icinga-API to install anymore The Icinga-Web REST API
12. IDOUtils Introduction
Purpose Design Overview Instances Installation
Components Overview IDOMOD LOG2IDO
FILE2SOCK IDO2DB. IDO2DB
Configuration of IDOUtils IDOMOD config options IDO2DB config options
Example Configurations Single Server, Single Instance Setup Single Server, Multiple Instance Setup Single Server, Single Instance Log File Import
IDOUtils Database Model Central Tables
Debugging Tables Historical Tables
4
Icinga Version 1.7 Documentation
-
8/18/2019 Icinga v17 En
5/727
-
8/18/2019 Icinga v17 En
6/727
12.4. Instance names based on their purpose 12.5. Loaded IDOMOD Event broker Module 12.6. IDOMOD Capabilities 12.7. LOG2IDO Utility 12.8. FILE2SOCK Utility 12.9. IDO2DB Daemon
12.10. IDO2DB with multiple Clients 12.11. Single Server, Single Instance Setup 12.12. Single Server, Multiple Instance Setup 12.13. Single Server, Single Instance Log File Import 12.14. Relationship of Central Tables 12.15. Relationship of Debugging Tables 12.16. Relationship of Historical Tables 12.17. Relationship of Current Status Tables 12.18. Relationship of Configuration Tables
List of Tables
6.1. Configuration files
Next
Chapter 1. About
© 2009-2012 Icinga Development Team, http://www.icinga.org
6
Icinga Version 1.7 Documentation
http://-/?-http://-/?-
-
8/18/2019 Icinga v17 En
7/727
Chapter 1. About
Prev Next
Chapter 1. About
Table of Contents
About Icinga What’s New in Icinga 1.7
Prev Next
Icinga Version 1.7 Documentation Home About Icinga
© 2009-2012 Icinga Development Team, http://www.icinga.org
7
Chapter 1. About
-
8/18/2019 Icinga v17 En
8/727
About Icinga
Prev Chapter 1. About Next
About Icinga
What is Icinga?
Icinga is a monitoring system checking hosts and services you specify and notifying you whenthings go wrong and when they recover. It runs on multiple Linux distributions (includingFedora, Ubuntu, and openSuSE) as well as several Unix platforms (including Solaris and HP).The systems to be monitored can be nearly anything connected to a network.
Some of the many features of Icinga include:
Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
Monitoring of host resources (CPU load, disk usage, etc.)
Simple plugin design that allows users to easily develop their own service checksParallelized service checks
Ability to define network host hierarchy using "parent" hosts, allowing detection of anddistinction between hosts that are down and those that are unreachable
Contact notifications when service or host problems occur and get resolved (via email,pager, or user-defined method)
Ability to define event handlers to be run during service or host events for proactiveproblem resolution
Automatic log file rotation
Support for implementing redundant monitoring hosts
Optional classic web interface for viewing current network status, notification and problemhistory, log file, etc.
Optional new Icinga web interface based on Icinga Core, IDOUtils, API using a modernand refreshed web 2.0 GUI showing current states, historical information, using cronks andfilters, creating reports with multilanguage support
System requirements
8
About Icinga
http://fedoraproject.org/http://www.ubuntu.com/http://www.ubuntu.com/http://www.opensuse.org/http://www.sun.com/software/solaris/http://www.hp.com/http://www.hp.com/http://www.sun.com/software/solaris/http://www.opensuse.org/http://www.ubuntu.com/http://fedoraproject.org/
-
8/18/2019 Icinga v17 En
9/727
As mentioned above you’ll need a machine running Linux or a Unix variant. If there is noprecompiled version or if you want to compile from source you need a C compiler like gcc.
Note
Some compilers may not be suitable. That includes the C compiler on HP-UX which is
used to compile a new kernel.
You may also want to have TCP/IP configured as most checks will require access via thenetwork.
You are not required to use one of the web interfaces included with Icinga. However, if you dodecide to use them, you will need additional software:
1. A Web-Server (preferrably Apache)
2. Thomas Boutells gd library Version 1.6.3 or higher (required by the statusmap- andtrends-CGIs)
3. PHP
Licensing
Icinga is licensed under the terms of the GNU General Public License Version 2 as published bythe Free Software Foundation. This gives you legal permission to copy, distribute and/ormodify Icinga under certain conditions. Read the ’LICENSE’ file in the Icinga distribution orread the online version of the license for more details. Icinga is provided AS IS with NOWARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgements
Several people have contributed to Icinga by either reporting bugs, suggesting improvements,writing plugins, etc. A list of some of the many contributors to the development of Icinga can befound at http://www.icinga.org/.
Downloading The Latest Version
You can check for new versions of Icinga at http://www.icinga.org/.
Compatibility
Icinga is a fork of the well-known monitoring system Nagios. Being 100% compatible with theinternal structures of the latter Icinga enables you to use all plugins and add-ons whichwere/are developed by several companies and the large community.
Prev Up Next
Chapter 1. About Home What’s New in Icinga 1.7
© 2009-2012 Icinga Development Team, http://www.icinga.org
9
About Icinga
http://www.apache.org/http://www.apache.org/http://www.boutell.com/gdhttp://www.icinga.org/teamhttp://www.icinga.org/http://www.nagios.org/http://www.nagios.org/http://www.nagios.org/http://www.icinga.org/http://www.icinga.org/teamhttp://www.boutell.com/gdhttp://www.apache.org/
-
8/18/2019 Icinga v17 En
10/727
What’s New in Icinga 1.7
Prev Chapter 1. About Next
What’s New in Icinga 1.7
As usual this is only a brief overview. Please take a look at the Changelog as well if you are
missing something.
CHANGES
move bindir/idomod.o to libdir/idomod.so - make sure to update your configs afterupgrade!
move from /var/icinga to /var/spool/icinga in icinga.spec (upgrade safe)
rename icinga-idoutils rpm to icinga-idoutils-libdbi-mysql|pgsql in icinga.spec
--enable-libtap is deprecated, make test now works out-of-the-box with rewritten tests core
Core
avoid insane looping through event list when rescheduling checks (Mathias Kettner,Andreas Ericsson) #2182
add a lot of configure params to allow easier packaging (see CHANGES)
introduce lib/ for modules with new .so extension
add nebmodule version/name check for idomod (this allows future version dependencies)#2569
add trigger_time to downtimes to allow calculating of flexible downtimes endtime #2537
* fix scheduled_downtime_depth falsely incremented if in flexible downtime with duration< end-starttime window #2536
Classic UI
add option for max log entries displayed in showlog.cgi #2145
add statusmap resizing with exclude/include button (thanks to Mat) #2186
add javascript to refresh page/pause easier #2119
10
What’s New in Icinga 1.7
-
8/18/2019 Icinga v17 En
11/727
add display_status_totals as cgi.cfg option in order to allow the status totals to be shownagain #2443
add readonly cgi.cfg view into the config section #1776
add is_in_effect and trigger_time to downtime view for html, csv, json #2538
add modified attributes view and reset cmd #2473 #2474
fix status totals are wrong when searching #1524
fix reset forms on return after submitting command #2117
IDOutils
change varchar(255) to TEXT in mysql (not cs and address rfc columns) #2181
set module info in idomod, to be checked on neb module load in future versions #2569
change standard string escaping for postgresql queries to use the E’foo’ notation #1974
fix lob handling in Oracle #2303,#2342
fix OCI-21500 when freeing lobs #2509
fix pgsql unix_timestamp cannot handle timstamp with timezone #2203
Icinga-Web
add DQL-views as backend for templates. This means that you can create your XML views based on doctrine query language. It’s more flexible to adopt database changes or to
connect other systems to your grids like trouble ticket or issue based systems
enable "save" and "save as" for custom cronks. This allows you to modify your viewswithout hacking data
adjust GUI calculations to be more like in the classic UI. Many calculations had differentalgorithms compared to the classic user interface which was confusing for the users
many fixes for views (grids and tactical overviews) to work more smoothly
RDBMS fixes for getting data, fixed problems for Oracle and Postgres
Docs
Hints how to use recurring downtimes #1867
More at Icinga Wiki
Should you find any issues, please report them to one of the following links:
Report Issue Icinga-Core
Report Issue Icinga-Web
Report Issue Icinga-API
11
What’s New in Icinga 1.7
https://wiki.icinga.org/display/Dev/Releaseshttps://dev.icinga.org/projects/show/icinga-corehttps://dev.icinga.org/projects/show/icinga-webhttps://dev.icinga.org/projects/show/icinga-apihttps://dev.icinga.org/projects/show/icinga-apihttps://dev.icinga.org/projects/show/icinga-webhttps://dev.icinga.org/projects/show/icinga-corehttps://wiki.icinga.org/display/Dev/Releases
-
8/18/2019 Icinga v17 En
12/727
Report Issue Icinga-Reporting
Report Issue Icinga-Docs
Prev Up Next
About Icinga Home Chapter 2. Getting Started
© 2009-2012 Icinga Development Team, http://www.icinga.org
12
What’s New in Icinga 1.7
https://dev.icinga.org/projects/show/icinga-reportinghttps://dev.icinga.org/projects/show/icinga-docshttps://dev.icinga.org/projects/show/icinga-docshttps://dev.icinga.org/projects/show/icinga-reporting
-
8/18/2019 Icinga v17 En
13/727
Chapter 2. Getting Started
Prev Next
Chapter 2. Getting Started
Table of Contents
Advice for beginners Quickstart Installation Guides Icinga Quickstart Icinga Quickstart FreeBSD Icinga with IDOUtils Quickstart Icinga and IDOUtils Quickstart on FreeBSD Links to other published Howtos Upgrading (to) Icinga Upgrading IDOUtils Database Monitoring Overview Monitoring Windows Machines
Monitoring Linux/Unix Machines Monitoring Netware Servers Monitoring Network Printers Monitoring Routers and Switches Monitoring Publicly Available Services
Prev Next
What’s New in Icinga 1.7 Home Advice for beginners
© 2009-2012 Icinga Development Team, http://www.icinga.org
13
Chapter 2. Getting Started
-
8/18/2019 Icinga v17 En
14/727
Advice for beginners
Prev Chapter 2. Getting Started Next
Advice for beginners
Thanks for choosing Icinga! Icinga is quite powerful and flexible and although you can see the
first results in less than 30 minutes, this is just the beginning of your journey into systemmonitoring. Configuring it to your needs can take a lot of work depending on the number of things to be monitored and the complexity of your environment. Once you become familiarwith how it works and what it can do for you, you’ll never want to be without it. :-) Here aresome important things to keep in mind for first-time Icinga users:
1. Relax - it’s going to take some time. Don’t expect to be able to get things working exactlythe way you want them right off the bat. It’s not that easy. Setting up Icinga can involve a
bit of work - partly because of the options that Icinga offers, partly because you need toknow what to monitor on your network (and how best to do it)
2. Please use the quickstart instructions. The quickstart installation guide is designed to get
most new users up and running with a basic Icinga setup fairly quickly. Within 20 minutesyou can have Icinga installed and monitoring your local system. Once that’s complete, youcan move on to learning how to configure Icinga to do more.
3. Read the documentation. Icinga can be tricky to configure when you’ve got a good grasp of what’s going on, and nearly impossible if you don’t. Make sure you read thedocumentation (particularly the sections on "Configuring Icinga" and "The Basics"). Savethe advanced topics for when you’ve got a good understanding of the basics.
4. Seek the help of others. If you’ve read the documentation, reviewed the sample config files,and are still having problems, send an email message describing your problems to theicinga-users mailing list. If you’ve done some background reading and you provide a goodproblem description, odds are that someone will give you some pointers on getting thingsworking properly. "good description" means to include details on your operating system,the version of Icinga, as well as what you tried and the results of it (preferablycopy&paste). More information on subscribing to the mailing lists or searching the listarchives can be found at http://www.icinga.org/community/.
Prev Up Next
Chapter 2. Getting Started Home Quickstart Installation Guides
© 2009-2012 Icinga Development Team, http://www.icinga.org
14
Advice for beginners
http://www.icinga.org/community/http://www.icinga.org/community/http://www.icinga.org/community/http://www.icinga.org/community/
-
8/18/2019 Icinga v17 En
15/727
Quickstart Installation Guides
Prev Chapter 2. Getting Started Next
Quickstart Installation Guides
Introduction
These quickstart guides will provide you with simple instructions on how to install Icinga fromsource and have it monitoring your local machine within 20 to 30 minutes. Advancedinstallation options and configuration are discussed elsewhere.
Links to configuration tools and other addons can be found here.
Note
Instead of installing Icinga from scratch you may want to use a package which might be available for your OS. Please take a look at the table of packages.
If you are planning to install from source then please use the official release tarball.
Important
Please don’t use git snapshots unless you have an issue which might be solved inthe current developer version.
Besides, a new quick install guide for using the IDOUtils of Icinga is also available enabling youto use an RDBMS based on MySQL, Oracle, or PostgreSQL, respectively.
Guides
Quickstart installation guides are currently available for various Linux distributions (mostcommon Fedora, Ubuntu, openSuSE). Because some distributions are similar you may succeedto use these instructions for RedHat, CentOS, Debian and SLES as well. Marcel Hecko provideda quickstart quide for FreeBSD.
Note
Please note that sometimes names of packages change between different versions of the same OS so if you don’t find the packages mentioned it might be a good idea touse your favourite search engine to find out the correct name.
15
Quickstart Installation Guides
https://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packages
-
8/18/2019 Icinga v17 En
16/727
The Quickstart guide for Linux and Quickstart guide for FreeBSD, resp., provide you withinstructions on how to install Icinga, basic plugins to check several things and the classical GUIaccessible through your web browser. The look and feel is quite similar to Nagios although theGUI offers some enhancements (extended CSV export, submit commands for a group of objects,etc.). There is no database involved and all information is stored in flat files. Icinga-Web is notavailable in this setup.
Using the Quickstart guide including IDOUtils and Quickstart guide including IDOUtils onFreeBSD, resp., you will get the things mentioned above plus a database (using MySQL, Oracle,or PostgreSQL) to store current and historical information. The database is not used to enableconfiguration via a web interface. There are several addons specialised on this and there are noplans for a builtin tool. The new web interface can be installed when you use this setup. Thereare separate instructions on how to do this after you installed Icinga and IDOUtils.
See: Quickstart guide for Linux
See: Quickstart guide for FreeBSD
See: Quickstart guide including IDOUtils
See: Quickstart guide including IDOUtils on FreeBSD
If you are installing Icinga on an operating system or Linux distribution that isn’t listed above,read Quickstart guide for Linux for an overview on what you’ll need to do.
Command names, paths, etc. vary widely across different Operating Systems/Distributions, soyou’ll likely need to tweak the installation docs a bit to work for your particular case.
Prev Up Next
Advice for beginners Home Icinga Quickstart
© 2009-2012 Icinga Development Team, http://www.icinga.org
16
Quickstart Installation Guides
-
8/18/2019 Icinga v17 En
17/727
Icinga Quickstart
Prev Chapter 2. Getting Started Next
Icinga Quickstart
Introduction
Note
Instead of installing Icinga from scratch you may want to use a package which might be available for your OS. Please take a look at the table of packages.
If you are planning to install from source then please use the official release tarball.
Important
Please don’t use git snapshots unless you have an issue which might be solved inthe current developer version.
This guide is intended to provide you with simple instructions on how to install Icinga fromsource (code) and have it monitoring your local machine within 20 minutes.
No advanced installation options are discussed here - just the basics that will work for most of the users who want to get started.
This guide will give you examples for currently three different Linux distributions: Fedora, Ubuntu and openSuSE. Similar distributions may work as well. That should include RedHat, CentOS, Debian and SLES.
For instructions on how to install Icinga on FreeBSD please read Icinga on FreeBSD instead.
Other distributions may inherit from these examples.
If you are planning to use a database with IDOUtils, or wish to use the new web interfacethen please read Icinga with IDOUtils instead!
What You’ll End Up With
If you follow these instructions, here’s what you’ll end up with:
Icinga and the plugins will be installed underneath /usr/local/icinga
17
Icinga Quickstart
https://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttp://fedoraproject.org/http://fedoraproject.org/http://www.ubuntu.com/http://www.opensuse.org/http://www.redhat.com/http://www.redhat.com/http://www.centos.org/http://www.centos.org/http://www.debian.org/http://www.debian.org/http://www.novell.com/products/server/http://www.novell.com/products/server/http://www.novell.com/products/server/http://www.debian.org/http://www.centos.org/http://www.redhat.com/http://www.opensuse.org/http://www.ubuntu.com/http://fedoraproject.org/https://www.icinga.org/download/packages
-
8/18/2019 Icinga v17 En
18/727
Icinga will be configured to monitor a few aspects of your local system (CPU load, diskusage, etc.)
The Icinga classic web interface will be accessible at http://localhost/icinga/ orhttp://yourdomain.com/icinga
Prerequisites
During portions of the installation you’ll need to have root access to your machine.
Make sure you’ve installed the following packages on your system before continuing.
Apache
GCC compiler
C/C++ development libraries
GD development libraries
Optional
At one time or another you may need to use SNMP-based checks so it is a good idea to installthe required packages now. Otherwise some plugins are not compiled i.e. not available whenyou need them and it would require a recompile of the plugins.
Install packages
You can install these packages by running the following commands (as root or using sudo).
Note
Unfortunately sometimes the names of packages change between different releases of the same distribution so if you get a message that one of the packages cannot be foundthen please use the search option of your package manager to get the new name:
yum search (Fedora/RHEL/CentOS)
apt-cache search (Debian/Ubuntu)
zypper search (openSuSE/SLES)
Fedora/RHEL/CentOS #> yum install httpd gcc glibc glibc-common gd gd-devel
#> yum install libjpeg libjpeg-devel libpng libpng-devel
#> yum install net-snmp net-snmp-devel net-snmp-utils
Note
You may have to use libjpeg-turbo and libjpeg-turbo-devel instead
Debian/Ubuntu
#> apt-get install apache2 build-essential libgd2-xpm-dev #> apt-get install libjpeg62 libjpeg62-dev libpng12 libpng12-dev
#> apt-get install snmp libsnmp5-dev
18
Icinga Quickstart
http://www.apache.org/http://www.boutell.com/gd/http://www.boutell.com/gd/http://www.apache.org/
-
8/18/2019 Icinga v17 En
19/727
Note
The numbers might differ, depending on your distribution
Note
Starting with Debian 6.0 / Ubuntu 10.10 the package is called libpng-12-0, thename of the dev-package hasn’t changed.
openSuSE/SLES
Please use YaST to install at least the packages gd, gd-devel, libjpeg, libjpeg-devel, libpng,libpng-devel and, optionally, net-snmp, net-snmp-devel and perl-Net-SNMP.
Using zypper should work as well:
#> zypper install gd gd-devel libjpeg libjpeg-devel libpng libpng-devel
#> zypper install net-snmp net-snmp-devel perl-Net-SNMP
Note
Depending on the software selection during the installation of the OS you mayneed to install additional packages (i.e. apache2, gcc). The devel packages might
be placed on the SDK DVDs.
Create Account Information
Become the root user.
$> su -l
Create a new icinga user account and give it a password:
#> /usr/sbin/useradd -m icinga
#> passwd icinga
On some distributions you’ll need to add the group in a single step:
#> /usr/sbin/groupadd icinga
For sending commands from the classic web interface to Icinga, you’ll need to create a newgroup icinga-cmd. Add the webuser and the Icinga user to this group:
#> /usr/sbin/groupadd icinga-cmd
#> /usr/sbin/usermod -a -G icinga-cmd icinga
#> /usr/sbin/usermod -a -G icinga-cmd www-data
(or www, wwwrun, apache, depending on the distribution)
Note
Some usermod-versions (e.g. in OpenSuSE 11 and SLES 11, resp.) are lacking theoption -a. In this case please omit the option -a.
19
Icinga Quickstart
-
8/18/2019 Icinga v17 En
20/727
Note
Solaris only supports groupnames with max. 8 characters, please use icingcmdinstead of icinga-cmd.
Download Icinga and the Plugins
Change to your local source directory i.e. /usr/src
#> cd /usr/src
Get the current source from the Icinga Website.
Don’t forget to download the Nagios Plugins.
Compile and install Icinga
Extract the Icinga source code tarball (or change directory to the GIT snapshot)
#> cd /usr/src/
#> tar xvzf icinga-1.7.tar.gz
#> cd icinga-1.7
Run the Icinga configure script. You will get help by using the --help flag.
#> ./configure --with-command-group=icinga-cmd
Compile the Icinga source code. To see available options, only use "make".
#> make all
Install binaries, init script, sample config files, some eventhandlers, and set permissions on theexternal command directory.
#> make install
#> make install-init
#> make install-config
#> make install-eventhandlers
#> make install-commandmode
or shorter
#> make fullinstall
#> make install-config
Note
Starting with Icinga 1.5.0 make install-config is NOT included in makefullinstall anymore to avoid accidently overwriting of your config files.
Note
Starting with Icinga 1.7.0 make install-eventhandlers will install some eventhandler routines. To prevent undesired behaviour it is only included when you usemake fullinstall.
Don’t start Icinga yet - there’s still more that needs to be done...
20
Icinga Quickstart
http://www.icinga.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.icinga.org/
-
8/18/2019 Icinga v17 En
21/727
Customise Configuration
Sample configuration files have been installed by using
#> make install-config
into /usr/local/icinga/etc/. You’ll need to make just one change before you proceed...
Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favourite editor and changethe email address associated with the icingaadmin contact definition to the address you’d like touse for receiving alerts.
#> vi /usr/local/icinga/etc/objects/contacts.cfg
Configure the Classic Web Interface
Icinga ships with the Classic Web Interface ("the CGIs") which can be installed via
#> make cgis
#> make install-cgis
#> make install-html
If you are interested in the new Icinga Web, please refer to Install Icinga Web Interface.
Install the Icinga Classic web config file in the Apache conf.d directory.
#> make install-webconf
Create an icingaadmin account for logging into the Icinga classic web interface. If you want tochange it later, use the same command. Remember the password you assign to this account -you’ll need it later.
#> htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
If you want to change it later or want to add another user, use the following command:
#> htpasswd /usr/local/icinga/etc/htpasswd.users
Note
Depending on your distribution/Apache-version you may have to use htpasswd2 instead.
Reload/Restart Apache to make the new settings take effect.
Fedora/RHEL/CentOS
#> service httpd restart
Debian/Ubuntu/openSuSE
#> /etc/init.d/apache2 reload
Compile and Install the Nagios Plugins
Extract the Nagios plugins source code tarball.
#> cd /usr/src
#> tar xvzf nagios-plugins-1.4.15.tar.gz
#> cd nagios-plugins-1.4.15
21
Icinga Quickstart
-
8/18/2019 Icinga v17 En
22/727
Compile and install the plugins by changing install directory to /usr/local/icinga
#> ./configure \
--prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga \
--with-nagios-user=icinga --with-nagios-group=icinga
#> make
#> make install
Adjusting the SELinux settings
RHEL and derived distributions like Fedora and CentOS are shipped with activated SELinux(Security Enhanced Linux) running in "enforcing" mode. This may lead to "Internal ServerError" messages when you try to invoke the Icinga-CGIs.
Check if SELinux runs in enforcing mode
#> getenforce
Set SELinux in "permissive" mode
#> setenforce 0
To make this change permanent you have to adjust this setting in /etc/selinux/config and restartthe system.
Instead of deactivating SELinux or setting it into permissive mode you can use the followingcommands to run the CGIs in enforcing/targeted mode:
#> chcon -R -t httpd_sys_script_exec_t /usr/local/icinga/sbin/
#> chcon -R -t httpd_sys_content_t /usr/local/icinga/share/
#> chcon -R -t httpd_sys_script_rw_t /usr/local/icinga/var/rw/
Visit the NagiosCommunity.org-Wiki at http://www.nagioscommunity.org/wiki to getinformation how to run the Icinga-CGIs in enforcing mode with a targeted policy.
Start Icinga
Add Icinga to the list of system services and have it automatically start when the system boots(make sure you have installed the init script before).
Fedora/RHEL/CentOS/openSuSE
#> chkconfig --add icinga
#> chkconfig icinga on
Debian/Ubuntu
#> update-rc.d icinga defaults
Verify the sample Icinga configuration files.
#> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
Instead of specifying the paths to binary and config file you can issue
#> /etc/init.d/icinga show-errors
which results in an OK message if everything is fine or several lines which show thelocation of the error(s).
22
Icinga Quickstart
http://www.nagioscommunity.org/wikihttp://www.nagioscommunity.org/wiki
-
8/18/2019 Icinga v17 En
23/727
If there are no errors, start Icinga.
Fedora/RHEL/CentOS/Ubuntu
#> service icinga start
Debian/openSuSE
#> /etc/init.d/icinga start
Login to the Classic Web Interface
You should now be able to access the Icinga classic web interface at the URL below. You’ll beprompted for the username ( icingaadmin) and password you specified earlier.
http://localhost/icinga/
or
http://yourdomain.com/icinga/
Click on the "Service Detail" navbar link to see details of what’s being monitored on your localmachine. It will take a few minutes for Icinga to check all the services associated with yourmachine.
Other Modifications
Make sure your system’s firewall rules are configured to allow access to the web server if youwant to access the Icinga classic interface remotely.
#> iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
Setting up your mail transfer agent (MTA) like exim, sendmail or postfix to allow Icingasending notification emails won’t be explained here.
Please refer to the Nagios-Wiki for more resources.
You’re Done
Congratulations! You successfully installed Icinga. Your journey into monitoring has just begun.
You’ll no doubt want to monitor more than just your local machine, so check out the chapter on"Getting Started" about "Monitoring ..."
Prev Up Next
Quickstart Installation Guides Home Icinga Quickstart FreeBSD
© 2009-2012 Icinga Development Team, http://www.icinga.org
23
Icinga Quickstart
http://www.nagioswiki.org/http://www.nagioswiki.org/http://www.nagioswiki.org/
-
8/18/2019 Icinga v17 En
24/727
Icinga Quickstart FreeBSD
Prev Chapter 2. Getting Started Next
Icinga Quickstart FreeBSD
Introduction
Note
Instead of installing Icinga from scratch you may want to use a package which might be available for your OS. Please take a look at the table of packages.
If you are planning to install from source then please use the official release tarball.
Important
Please don’t use git snapshots unless you have an issue which might be solved inthe current developer version.
This guide is intended to provide you with simple instructions on how to install Icinga fromsource (code) and have it monitoring your local machine within 20 minutes.
No advanced installation options are discussed here - just the basics that will work for most of the users who want to get started.
This guide will give you examples for installation on FreeBSD 7.2.
Later distributions of FreeBSD may inherit from these examples.
What You’ll End Up With
If you follow these instructions, here’s what you’ll end up with:
Icinga and the plugins will be installed underneath /usr/local/icinga
Icinga will be configured to monitor a few aspects of your local system (CPU load, diskusage, etc.)
The Icinga classic web interface will be accessible at http://localhost/icinga/ orhttp://yourdomain.com/icinga
Prerequisites
24
Icinga Quickstart FreeBSD
https://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packages
-
8/18/2019 Icinga v17 En
25/727
During portions of the installation you’ll need to have root access to your machine.
Make sure you’ve installed the following packages on your system before continuing.
Apache
GCC compiler
C/C++ development libraries
GD development libraries
Install ports
You can install these ports by running the following commands (as root):
Please update your ports before doing so.
#> cd /usr/ports/devel/libtool22/ && make deinstall && make clean && make && make install
#> cd /usr/ports/graphics/jpeg && make deinstall && make clean && make && make install #> cd /usr/ports/graphics/png && make deinstall && make clean && make && make install
#> cd /usr/ports/graphics/gd && make deinstall && make clean && make && make install
Note
Please make sure you have Apache installed - the process will not be discussed here,however the lead is # cd /usr/ports/www/apache22 && make clean && make.
Create Account Information
Become the root user.
$> su -l
Create a new icinga user account without a password and without the ability to log-in (set nopassword when asked):
#> adduser -D -w no -s nologin
For sending commands from the classic web interface to Icinga, you’ll need to create a newgroup icinga-cmd and add the webuser (www) and the Icingauser to this group:
#> pw groupadd -n icinga-cmd -M icinga,www
Download Icinga and the Plugins
Change to your local source directory i.e. ~/src
#> mkdir ~/src
#> cd ~/src
Get the current source from the Icinga Website .
Don’t forget to download the Nagios Plugins .
Compile and install Icinga
Extract the Icinga source code tarball (or change directory to the GIT snapshot)
25
Icinga Quickstart FreeBSD
http://www.apache.org/http://www.boutell.com/gd/http://www.icinga.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.icinga.org/http://www.boutell.com/gd/http://www.apache.org/
-
8/18/2019 Icinga v17 En
26/727
#> cd ~/src/
#> tar xvzf icinga-1.7.tar.gz
#> cd icinga-1.7
Run the Icinga configure script. You will get help by using the --help flag.
#> ./configure --with-httpd-conf=/usr/local/etc/apache22/Includes/ \
--with-gd-lib=/usr/local/lib/ \
--with-gd-inc=/usr/local/include/ \
--with-command-group=icinga-cmd
Compile the Icinga source code. To see available options, only use "make".
#> make all
Install binaries, init script, sample config files, some eventhandlers, and set permissions on theexternal command directory.
#> make install
#> make install-init
#> make install-config
#> make install-eventhandlers
#> make install-commandmode
or shorter
#> make fullinstall
#> make install-config
Note
Starting with Icinga 1.5.0 make install-config is NOT included in makefullinstall anymore to avoid accidently overwriting of your config files.
Note
Starting with Icinga 1.7.0 make install-eventhandlers will install some eventhandler routines. To prevent undesired behaviour it is only included when you usemake fullinstall.
The Icinga-API will be installed during "make install" so if you are required to install itmanually please try:
#> make install-api
This will be mandatory for Icinga Web.
Don’t start Icinga yet - there’s still more that needs to be done...
Customise Configuration
Sample configuration files have been installed using
#> make install-config
into /usr/local/icinga/etc/. You’ll need to make just one change before you proceed...
Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favourite editor and changethe email address associated with the icingaadmin contact definition to the address you’d like touse for receiving alerts.
26
Icinga Quickstart FreeBSD
-
8/18/2019 Icinga v17 En
27/727
#> vi /usr/local/icinga/etc/objects/contacts.cfg
Install and configure the Classic Web Interface
Icinga ships with the Classic Web Interface ("the CGIs") which can be installed via
#> make cgis
#> make install-cgis #> make install-html
If you are interested in the new Icinga Web, please refer to Install Icinga Web Interface.
Install the Icinga Classic web config file in the Apache conf.d directory.
Note
There is currently a bug in Icinga Makefile which directly prevents this make command,please edit Makefile file in Icinga source directory and change the line
$(INSTALL) -D -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
to
$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
#> make install-webconf
Create an icingaadmin account for logging into the Icinga classic web interface. If you want tochange it later, use the same command. Remember the password you assign to this account -you’ll need it later.
#> htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
If you want to change it later or want to add another user, use the following command:
#> htpasswd /usr/local/icinga/etc/htpasswd.users
Reload/Restart Apache to make the new settings take effect.
#> /usr/local/etc/rc.d/apache22 reload
Compile and Install the Nagios Plugins
Extract the Nagios plugins source code tarball.
#> cd ~/src#> tar xvzf nagios-plugins-1.4.15.tar.gz
#> cd nagios-plugins-1.4.15
Compile and install the plugins by changing install directory to /usr/local/icinga
#> ./configure --prefix=/usr/local/icinga \
--with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga \
--with-nagios-user=icinga --with-nagios-group=icinga
#> make
#> make install
Start Icinga
Add Icinga to the list of system services and have it automatically start when the system boots(make sure you have installed the init script before).
27
Icinga Quickstart FreeBSD
-
8/18/2019 Icinga v17 En
28/727
#> echo icinga_enable=\"YES\" >> /etc/rc.conf
Verify the sample Icinga configuration files.
#> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
If there are no errors, start Icinga.
#> /usr/local/etc/rc.d/icinga start
Login to the Classic Web Interface
You should now be able to access the Icinga classic web interface at the URL below. You’ll beprompted for the username ( icingaadmin) and password you specified earlier.
http://localhost/icinga/
or
http://yourdomain.com/icinga/
Click on the "Service Detail" navbar link to see details of what’s being monitored on your localmachine. It will take a few minutes for Icinga to check all the services associated with yourmachine.
Other Modifications
Make sure your system’s firewall rules are configured to allow access to the web server if youwant to access the Icinga classic interface remotely.
#> TCP port 80
Setting up your mail transfer agent (MTA) like exim, sendmail or postfix to allow Icingasending notification emails won’t be explained here.
Please refer to the Nagios-Wiki for more resources.
You’re Done
Congratulations! You successfully installed Icinga. Your journey into monitoring has just begun.
You’ll no doubt want to monitor more than just your local machine, so check out the chapter on"Getting Started" about "Monitoring ..."
Prev Up Next
Icinga Quickstart Home Icinga with IDOUtils Quickstart
© 2009-2012 Icinga Development Team, http://www.icinga.org
28
Icinga Quickstart FreeBSD
http://www.nagioswiki.org/http://www.nagioswiki.org/http://www.nagioswiki.org/
-
8/18/2019 Icinga v17 En
29/727
Icinga with IDOUtils Quickstart
Prev Chapter 2. Getting Started Next
Icinga with IDOUtils Quickstart
Introduction
Note
Instead of installing Icinga from scratch you may want to use a package which might be available for your OS. Please take a look at the table of packages.
If you are planning to install from source then please use the official release tarball.
Important
Please don’t use git snapshots unless you have an issue which might be solved inthe current developer version.
This guide is intended to provide you with simple instructions on how to install Icinga fromsource (code) and have it monitoring your local machine within 30 minutes.
No advanced installation options are discussed here - just the basics that will work for most of the users who want to get started.
This guide will give you examples for currently three different Linux distributions: Fedora, Ubuntu and openSuSE. Similar distributions may work as well. That should include RedHat, CentOS, Debian and SLES.
Other distributions may inherit from these examples.
If you are planning to use Icinga without IDOUtils please read “Icinga Quickstart” instead!
What You’ll End Up With
If you follow these instructions, here’s what you’ll end up with:
Icinga and the plugins will be installed underneath /usr/local/icinga
Icinga will be configured to monitor a few aspects of your local system (CPU load, diskusage, etc.)
29
Icinga with IDOUtils Quickstart
https://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttp://fedoraproject.org/http://fedoraproject.org/http://www.ubuntu.com/http://www.opensuse.org/http://www.redhat.com/http://www.redhat.com/http://www.centos.org/http://www.centos.org/http://www.debian.org/http://www.debian.org/http://www.novell.com/products/server/http://www.novell.com/products/server/http://www.novell.com/products/server/http://www.debian.org/http://www.centos.org/http://www.redhat.com/http://www.opensuse.org/http://www.ubuntu.com/http://fedoraproject.org/https://www.icinga.org/download/packages
-
8/18/2019 Icinga v17 En
30/727
The Icinga classic web interface will be accessible at http://localhost/icinga/ orhttp://yourdomain.com/icinga
A database which is filled by Icinga using IDOUtils
Prerequisites
During portions of the installation you’ll need to have root access to your machine.
Make sure you’ve installed the following packages on your system before continuing. IDOUtilsuse the libdbi and the libdbi-drivers for several databases. The development libraries are alsorequired. The following examples will show how to install the IDOUtils with the libdbi usingMySQL or PostgreSQL.
Apache
GCC compiler
C/C++ development libraries
GD development libraries
libdbi/libdbi-drivers, database like MySQL or PostgreSQL
Note
PostgreSQL: Due to changes on insert statements PostgreSQL 8.1 does no longerwork (and is already end-of-life since November 2010) so please use 8.2 or even
better 8.4. String escaping in PostgreSQL 9.x is still in an experimental state (referto issue #1974).
Optional
At one time or another you may need to use SNMP-based checks so it is a good idea to installthe required packages now. Otherwise some plugins are not compiled i.e. not available whenyou need them and it would require a recompile of the plugins.
New features for the IDOUtils:
SSL-Encryption between idomod and ido2db
If you want to use SSL-encryption you’ll need openssl and openssl-devel/libssl-dev (Ubuntu) to
be installed !
Oracle Database Support
If you want Oracle as RDBMS you’ll need to install ocilib instead of libdbi.
Note
Using IDOUtils 1.5.0 with Oracle requires at least OCILIB 3.9.2 - don’t install 3.9.0 or3.9.1 as they remain buggy.
30
Icinga with IDOUtils Quickstart
http://libdbi.sourceforge.net/http://www.boutell.com/gd/http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttps://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://www.boutell.com/gd/http://libdbi.sourceforge.net/
-
8/18/2019 Icinga v17 En
31/727
Note
More detailed instructions using IDOUtils with Oracle you can find in our wiki howtoseries about Oracle.
Oracle libraries and SDK (e.g. Instant Client)
If you install from package, make sure the libraries are within PATH. Otherwise you needto set the Oracle libs during Icinga IDOUtils install using e.g.--with-oracle-lib=/path/to/instantclient
ocilib instead of libdbi
Get it from http://orclib.sourceforge.net/ and point configure to your Oracle libraries andheader files e.g. from the Oracle instant client:
#> ./configure --with-oracle-headers-path=/path/to/instantclient/sdk/include \
--with-oracle-lib-path=/path/to/instantclient/
#> make
#> make install
Icinga 1.4
As of Icinga 1.4 the minimum expected Oracle version is Oracle 10gR2. Older versions maywork, but are not supported. Oracle scripts are designed to split data, index and lobs intodifferent tablespaces. For this reason there is a new prerequisite to define the tablespace namesyou want to use. If you are working in a small environment, you can set all defines to the samereal tablespace. You will find a new script icinga_defines.sql which you have to adapt foryour needs before applying oracle.sql. For your convenience there is a new scriptcreate_oracle_sys.sql included, which should help you to create the necessary
tablespaces and an Icinga application user and must run as SYS. It will make use oficinga_defines.sql as well. Object creation has been moved from oracle.sql to thescript create_icinga_objects_oracle.sql.
The former oracle.sql has been redesigned as a master script to record all other scripts asincludes and expects these includes within the current directory. For this reason you shouldstart sqlplus executing oracle.sql within this directory. This way the creation of user andtablespaces and the creation of Icinga tables runs in one step. As an all-in-one sample you willfind a new script db/scripts/create_oracledb.sh. Edit variables to suit your needs andenjoy. If you prefer to do SYS steps for yourself, please uncommentcreate_oracle_sys.sql and make sure that your database Icinga user and tables exist andare defined with the same (or more) rights and that the correct settings have been applied toicinga_defines.sql.
Timezone support
Starting with Icinga 1.6 all dates are stored as local timestamps in the database. Before that therewas a different behaviour storing and retrieving dates for each database system which wasdifficult to handle for frontend apps. Therefore datatypes have been changed for MySQL fromDATETIME to TIMESTAMP and for Oracle from DATE to LOCAL TIMESTAMP (0).PostgreSQL was already using TIMESTAMP but has been changed to TIMESTAMP WITHTIME ZONE. IDO2DB will set session timezone to UTC and store all unix timestamps (whichare UTC per definition) as UTC based values. Please make sure your system returns unix
timestamps as real UTC based values (like "date -u ’+%s’").
31
Icinga with IDOUtils Quickstart
https://wiki.icinga.org/display/howtos/Icinga+and+Oraclehttps://wiki.icinga.org/display/howtos/Icinga+and+Oraclehttps://wiki.icinga.org/display/howtos/Icinga+and+Oracle
-
8/18/2019 Icinga v17 En
32/727
Note
Make sure your database session runs in the same timezone in which the existingdates have been stored (check your local timezone e.g. Oracle:"select sessiontimezonefrom dual;") if you are running the upgrade script. Additionally for your conveniencein Oracle you should set your session timestamp format to the value you want, e.g"alter session set nls_timestamp_format=’YYYY-MM-DD HH24:MI:SS’;" or similar.Now you can view entries from different Icinga installations in different time zoneswhich are stored in the same database and regardless from where you accessing it, allentries are returned in your local time zone.
Install Packages
You can install your packages by running the following commands (as root or sudo).
Note
Unfortunately sometimes the names of packages change between different releases of
the same distribution so if you get a message that one of the packages cannot be foundthen please use the search option of your package manager to get the new name:
yum search ( Fedora/RHEL/CentOS )
apt-cache search ( Debian/Ubuntu )
zypper search ( openSuSE/SLES )
Fedora/RHEL/CentOS:
#> yum install httpd gcc glibc glibc-common gd gd-devel #> yum install libjpeg libjpeg-devel libpng libpng-devel
Note
You may have to use libjpeg-turbo and libjpeg-turbo-devel instead
MySQL:
#> yum install mysql mysql-server \
libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql
PostgreSQL: #> yum install postgresql postgresql-server \
libdbi libdbi-devel libdbi-drivers libdbi-dbd-pgsql
Debian/Ubuntu:
#> apt-get install apache2 build-essential libgd2-xpm-dev
#> apt-get install libjpeg62 libjpeg62-dev libpng12 libpng12-dev
Note
The numbers might differ, depending on your distribution
32
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
33/727
Note
Starting with Debian 6.0 / Ubuntu 10.10 the package is called libpng-12-0, the name of the dev-package hasn’t changed.
MySQL:
#> apt-get install mysql-server mysql-client libdbi1 libdbi-dev libdbd-mysql
PostgreSQL:
#> apt-get install postgresql libdbi1 libdbi-dev libdbd-pgsql
openSuSE:
Please use YaST to install at least the packages gd, gd-devel, libjpeg, libjpeg-devel, libpng,libpng-devel and, optionally, net-snmp, net-snmp-devel and perl-Net-SNMP.
Using zypper should work as well:
#> zypper install gd gd-devel libjpeg libjpeg-devel libpng libpng-devel
#> zypper install net-snmp net-snmp-devel perl-Net-SNMP
Note
The devel packages might be placed on the SDK DVDs.
MySQL:
Use YaST to install the packages for the RDBMS you want to use, i.e. "mysql",
"mysql-devel", "mysql-client" and the libdbi packages "libdbi", "libdbi-devel","libdbi-drivers" and "libdbi-dbd-mysql", or alternatively zypper.
#> zypper install mysql mysql-devel mysql-client \
libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql
Note
In OpenSuSE 11 (SLES 11) the name of the package was changed from"mysql-devel" to "libmysqlclient-devel".
PostgreSQL:
Use YaST to install the packages for the RDBMS you want to use, i.e. "postgresql","postgresql-devel", "postgresql-server" and the libdbi packages "libdbi", "libdbi-devel" and"libdbi-drivers", or alternatively zypper.
#> zypper install postgresql postgresql-devel postgresql-server
#> zypper install libdbi libdbi-devel libdbi-drivers
Using old OpenSuSE (SLES) versions including version 10 it is most likely that there aren’t anylibdbi packages so you have to download and compile the sources. Replace with yourdesired RDBM like mysql or pgsql. Remember that the Oracle driver is not yet working andread the appropriate section with ocilib instead of libdbi.
33
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
34/727
1. Download and extract the tar.gz files
http://libdbi.sourceforge.net/download.html
http://libdbi-drivers.sourceforge.net/download.html
#> tar xvzf libdbi-0.8.3.tar.gz
#> tar xvzf libdbi-drivers-0.8.3-1.tar.gz
2. Install libdbi. Maybe you have to specify additional options with configure (set--prefix=/usr ... )
#> cd libdbi-0.8.3
#> ./configure --disable-docs
#> make
#> make install
3. Install libdbi-drivers
#> cd libdbi-drivers-0.8.3-1
#> ./configure --with- --disable-docs #> make
#> make install
Note
Using the 64-bit-versions you have to specify the paths to the include- and lib-direxplicitly:
#> ./configure --with- \
--with--incdir=/usr/include// \
--with--libdir=/usr/lib64/ --disable-docs
Create Account Information
Become the root user.
$> su -l
Create a new Icinga user account and give it a password.
#> /usr/sbin/useradd -m icinga
#> passwd icinga
On some distributions you’ll need to add the group in a single step:
#> /usr/sbin/groupadd icinga
For sending commands from the classic web interface to Icinga, you’ll need to create a newgroup icinga-cmd. Add the webuser and the Icingauser to this group:
#> /usr/sbin/groupadd icinga-cmd
#> /usr/sbin/usermod -a -G icinga-cmd icinga
#> /usr/sbin/usermod -a -G icinga-cmd www-data
(or www, wwwrun, apache depending on the distribution)
Note
Some usermod-versions (e.g in OpenSuSE 11 and SLES 11, resp.) are lacking theoption -a. In this case please omit the option -a.
34
Icinga with IDOUtils Quickstart
http://libdbi.sourceforge.net/download.htmlhttp://libdbi-drivers.sourceforge.net/download.htmlhttp://libdbi-drivers.sourceforge.net/download.htmlhttp://libdbi.sourceforge.net/download.html
-
8/18/2019 Icinga v17 En
35/727
Important
Solaris only supports groupnames with max. 8 characters, please use icingcmdinstead of icinga-cmd.
Download Icinga and the Plugins
Change to your local source directory i.e. /usr/src
#> cd /usr/src
Get the current source from the Icinga Website. Don’t forget to download the Nagios Plugins
Compile and Install Icinga with IDOUtils
Extract the Icinga source code tarball
#> cd /usr/src/
#> tar xvzf icinga-1.7.tar.gz
#> cd icinga-1.7
Note
This absolute path is meant when we refer to ’/path/to/icinga-src/’ in the followingtext.
Run the Icinga configure script and enable IDOUtils. You will get help by using the --help flag:
#> ./configure --with-command-group=icinga-cmd --enable-idoutils
Also with PostgreSQL you should not use the argument --enable-pgsq because it is notsupported yet.
Important
Compiling on Solaris might fail upon unresolved library dependencies ongethostbyname. In that case run this before running configure:
#> export LIBS=-lsocket -lnsl
With SSL-Encryption:
#> ./configure --with-command-group=icinga-cmd --enable-idoutils --enable-ssl
With Oracle Database Support:
#> ./configure --with-command-group=icinga-cmd --enable-idoutils --enable-oracle
If you didn’t install Oracle libraries to PATH, you can point configure there:
#> ./configure --with-command-group=icinga-cmd \
--enable-idoutils --enable-oracle \
--with-oracle-lib=/path/to/instantclient
If you didn’t install ocilib to the default path (/usr/local) you can point configure to the lib/inc
directories:
35
Icinga with IDOUtils Quickstart
http://www.icinga.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.icinga.org/
-
8/18/2019 Icinga v17 En
36/727
#> ./configure --with-command-group=icinga-cmd \
--enable-idoutils --enable-oracle \
--with-ocilib-lib=/path/to/ocilib/lib \
--with-ocilib-inc=/path/to/ocilib/include
Note
If you want to change RDBM from Oracle to others, you need to recompile andreinstall IDOUtils!
#> make distclean
#> ./configure --enable-idoutils
Compile and Install
Compile the Icinga source code. There is also an extra option for IDOUtils (make idoutils) if youneed to recompile only this module. To see available options, only use "make".
#> make all
Install binaries, init script, sample config files, some eventhandlers, and set permissions on theexternal command directory.
#> make install
#> make install-init
#> make install-config
#> make install-eventhandlers
#> make install-commandmode
or shorter
#> make fullinstall
#> make install-config
Note
Starting with Icinga 1.5.0 make install-config is NOT included in makefullinstall anymore to avoid accidently overwriting of your config files.
Note
Starting with Icinga 1.7.0 make install-eventhandlers will install some eventhandler routines. To prevent undesired behaviour it is only included when you use
make fullinstall.
Note
Install IDOUtils and applicable event broker modules only using the primary "makeinstall" target. Do not manually copy and overwrite the existing module as this willresult in a segfault on icinga core which is using idomod.so directly preventingusage of a temporary copy explicitly. This is useful for OMD.
Note
The Icinga-API served as a database abstraction layer written in PHP. Starting withIcinga 1.5 it is replaced by an internal database abstraction layer so Icinga-API doesn’thave to be installed anymore.
36
Icinga with IDOUtils Quickstart
http://omdistro.org/http://omdistro.org/http://omdistro.org/
-
8/18/2019 Icinga v17 En
37/727
Don’t start Icinga yet - there’s still more that needs to be done...
Customise Configuration
Sample configuration files have been installed by using "make install-config" into/usr/local/icinga/etc/. You’ll need to make just one change before you proceed...
Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favourite editor and changethe email address associated with the icingaadmin contact definition to the address you’d like touse for receiving alerts.
#> vi /usr/local/icinga/etc/objects/contacts.cfg
#> cd /usr/local/icinga/etc/
#> mv idomod.cfg-sample idomod.cfg
#> mv ido2db.cfg-sample ido2db.cfg
If you want to enable SSL-encryption and you configured the IDOUtils with ./configure--enable-ssl, you have to change idomod.cfg as follows:
use_ssl=1
output_type=tcpsocket
output=127.0.0.1
(don’t forget to adjust the ip-address if your database isn’t located on localhost) and ido2db.cfgin the following way:
use_ssl=1
socket_type=tcp
Note
If SSL is enabled in ido2db but not in the different idomod clients - data from thoseinstances will be lost - that’s guaranteed! SSL configuration has to be the same on allnodes!!!
Enable the idomod event broker module
Important
Under normal circumstances the following module definition is already present inthe modules subdirectory so there is no need to edit the main config file
define module{
module_name ido_mod
path /usr/local/icinga/lib/idomod.so
module_type neb
args config_file=/usr/local/icinga/etc/idomod.cfg
}
This also means that a broker_module entry must not be enabled!
Creation of Database and IDOUtils
37
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
38/727
-
8/18/2019 Icinga v17 En
39/727
#> vi /etc/postgresql/8.x/main/pg_hba.conf
Fedora/RHEL/CentOS:
#> vi /var/lib/pgsql/data/pg_hba.conf
Edit the config e.g. like this (local user must be trusted)
# database administrative login by UNIX sockets
local all postgres ident
# TYPE DATABASE USER CIDR-ADDRESS METHOD
#icinga
local icinga icinga trust
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections
host all all 127.0.0.1/32 trust
# IPV6 local connections
host all all ::1/128 trust
Reload and configure database scheme.
#> /etc/init.d/postgresql-8.x reload
#> cd /path/to/icinga-src/module/idoutils/db/pgsql
#> psql -U icinga -d icinga < pgsql.sql
Edit the DB config file to customize IDOUtils
#> vi /usr/local/icinga/etc/ido2db.cfg
db_servertype=pgsql
db_port=5432
db_user=icinga
db_pass=icinga
Oracle:
Create a database schema and username/password (refer to the Oracle documentation athttp://www.oracle.com or consult your DBA). Import the database scheme with sqlplus(or your preferred method). Copy module/idoutils/db/oracle/* to$ORACLE_HOME and edit icinga_defines.sql to match tablespace and usercredential information.
#> su - oracle
$> sqlplus dbuser/dbpass
SQL> @oracle.sql
Edit the DB config file to customize IDOUtils. Remember that Oracle ignores the db host,instead point db_name to //DBSERVER/DBNAME
#> vi /usr/local/icinga/etc/ido2db.cfg
db_servertype=oracle
db_port=1521
db_user=icinga
db_pass=icinga
Configure the Classic Web Interface
Icinga ships with the classic web interface ("the CGIs") which can be installed via
#> make cgis
#> make install-cgis
#> make install-html
39
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
40/727
If you are interested in the new Icinga Web, please refer to Install Icinga Web Interface.
Install the Icinga classic web config file in the Apache conf.d directory.
#> make install-webconf
Create an icingaadmin account for logging into the Icinga classic web interface. Remember the
password you assign to this account - you’ll need it later.
#> htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
To change the password of an existing user or to add a new user, take this command:
#> htpasswd /usr/local/icinga/etc/htpasswd.users
Note
Depending on your distribution/Apache-version you may have to use htpasswd2 instead.
Reload/Restart Apache to make the new settings take effect.
Fedora/RHEL/CentOS:
#> service httpd restart
Ubuntu/openSuSE:
#> service apache2 restart
Debian:
#> /etc/init.d/apache2 reload
Compile and Install the Nagios Plugins
Extract the Nagios plugins source code tarball.
#> cd /usr/src
#> tar xvzf nagios-plugins-1.4.15.tar.gz
#> cd nagios-plugins-1.4.15
Compile and install the plugins by changing install directory to /usr/local/icinga
#> ./configure --prefix=/usr/local/icinga \
--with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga \
--with-nagios-user=icinga --with-nagios-group=icinga
#> make
#> make install
Adjusting the SELinux settings
RHEL and derived distributions like Fedora and CentOS are shipped with activated SELinux(Security Enhanced Linux) running in "enforcing" mode. This may lead to "Internal ServerError" messages when you try to invoke the Icinga-CGIs.
Check if SELinux runs in enforcing mode
40
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
41/727
#> getenforce
Set SELinux in "permissive" mode
#> setenforce 0
To make this change permanent you have to adjust this setting in /etc/selinux/config and restart
the system.
Instead of deactivating SELinux or setting it into permissive mode you can use the followingcommands to run the CGIs in enforcing/targeted mode:
#> chcon -R -t httpd_sys_script_exec_t /usr/local/icinga/sbin/
#> chcon -R -t httpd_sys_content_t /usr/local/icinga/share/
#> chcon -t httpd_sys_script_rw_t /usr/local/icinga/var/rw/icinga.cmd
Start IDOUtils and Icinga
IDOUtils must be started and running before Icinga is started.
Start IDOUtils:
Fedora/RHEL/CentOS/Ubuntu/openSuSE:
#> service ido2db start
Debian:
#> /etc/init.d/ido2db start
Stop IDOUtils:
Fedora/RHEL/CentOSUbuntu/openSuSE: #> service ido2db stop
Debian:
#> /etc/init.d/ido2db stop
Verify the sample Icinga configuration files.
#> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
If there are no errors, start Icinga.
Fedora/RHEL/CentOS/Ubuntu/openSuSE:
#> service icinga start
Debian:
#> /etc/init.d/icinga start
Configure Icinga Startup
Add Icinga to the list of system services and have it automatically start when the system boots(make sure you have installed the init script before).
41
Icinga with IDOUtils Quickstart
-
8/18/2019 Icinga v17 En
42/727
Fedora/RHEL/CentOS/openSuSE:
#> chkconfig --add icinga chkconfig icinga on
Debian/Ubuntu:
#> update-rc.d icinga defaults
Login to the Classic Web Interface
You should now be able to access the Icinga classic web interface at the URL below. You’ll beprompted for the username ( icingaadmin ) and password you specified earlier.
http://localhost/icinga/
or
http://yourdomain.com/icinga/
Click on the "Service Detail" navbar link to see details of what’s being monitored on your localmachine. It will take a few minutes for Icinga to check all the services associated with yourmachine.
Other Modifications
Make sure your system’s firewall rules are configured to allow access to the web server if youwant to access the Icinga classic interface remotely.
#> iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
Setting up your mail transfer agent (MTA) like exim, sendmail or postfix to allow Icingasending notification emails won’t be explained here. Please refer to the Nagios-Wiki for more
resources.
There are several tweaks for the IDOUtils (former NDOUtils of Nagios) available.
You’re Done
Congratulations! You successfully installed Icinga with IDOUtils. Your journey into monitoringhas just begun. You’ll no doubt want to monitor more than just your local machine, so check outthe chapter on "Getting Started" about "Monitoring ..."
Prev Up Next
Icinga Quickstart FreeBSDHome
Icinga and IDOUtils Quickstart onFreeBSD
© 2009-2012 Icinga Development Team, http://www.icinga.org
42
Icinga with IDOUtils Quickstart
http://www.nagioswiki.org/http://www.nagioswiki.org/http://www.nagioswiki.org/
-
8/18/2019 Icinga v17 En
43/727
Icinga and IDOUtils Quickstart on FreeBSD
Prev Chapter 2. Getting Started Next
Icinga and IDOUtils Quickstart on FreeBSD
Introduction
Note
Instead of installing Icinga from scratch you may want to use a package which might be available for your OS. Please take a look at the table of packages.
If you are planning to install from source then please use the official release tarball.
Important
Please don’t use git snapshots unless you have an issue which might be solved inthe current developer version.
This guide is intended to provide you with simple instructions on how to install Icinga fromsource (code) and have it monitoring your local machine within 30 minutes.
No advanced installation options are discussed here - just the basics that will work for most of the users who want to get started.
This guide will give you examples for installation on FreeBSD 8.1-RELEASE. Thanks to"ScotchTape" for the adapted instructions.
Later distributions of FreeBSD may inherit from these examples.
Note
Meanwhile there’s a FreeBSD port of Icinga (net-mgmt/icinga) so maybe that’s theone you want to install ;-).
What You’ll End Up With
If you follow these instructions, here’s what you’ll end up with:
Icinga and the plugins will be installed underneath /usr/local/icinga
Icinga will be configured to monitor a few aspects of your local system (CPU load, diskusage, etc.)
43
Icinga and IDOUtils Quickstart on FreeBSD
https://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttps://www.icinga.org/download/packageshttp://www.nagios-portal.org/wbb/index.php?page=User&userID=8925http://www.nagios-portal.org/wbb/index.php?page=User&userID=8925https://www.icinga.org/download/packages
-
8/18/2019 Icinga v17 En
44/727
The Icinga classic web interface will be accessible at http://localhost/icinga/ orhttp://yourdomain.com/icinga
a database being filled using the IDOUtils
Prerequisites
During portions of the installation you’ll need to have root access to your machine.
Make sure you’ve installed the following packages on your system before continuing.
Apache
GCC compiler
C/C++ development libraries
GD development libraries
libdbi-drivers, a database like MySQL, or PostgreSQL
Note
PostgreSQL: Due to changes on insert statements PostgreSQL 8.1 does no longerwork (and is already end-of-life since November 2010) so please use 8.2 or even
better 8.4. String escaping in PostgreSQL 9.x is still in an experimental state (referto issue #1974).
Optional
At one time or another you will likely use SNMP based checks so it might be a good idea toinstall the required packages now. Otherwise the plugins will not be compiled and are notavailable when you need them.
New features for the IDOUtils:
SSL-encryption between idomod and ido2db
If you want to use SSL-encryption : it is already installed.
Note
SSL has to be activated on all idomod clients, otherwise you will lose data!!!
Oracle database support
If you want to use Oracle as an RDBMS then we are sorry. Unfortunately it isn’t that easy withFreeBSD.
Timezone support
Starting with Icinga 1.6 all dates are stored as local timestamps in the database. Before that therewas a different behaviour storing and retrieving dates for each database system which was
difficult to handle for frontend apps. Therefore datatypes have been changed for MySQL fromDATETIME to TIMESTAMP and for Oracle from DATE to LOCAL TIMESTAMP (0).PostgreSQL was already using TIMESTAMP but has been changed to TIMESTAMP WITHTIME ZONE. IDO2DB will set session timezone to UTC and store all unix timestamps (which
44
Icinga and IDOUtils Quickstart on FreeBSD
http://www.apache.org/http://www.boutell.com/gd/http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttps://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974https://dev.icinga.org/issues/1974http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policyhttp://www.boutell.com/gd/http://www.apache.org/
-
8/18/2019 Icinga v17 En
45/727
are UTC per definition) as UTC based values. Please make sure your system returns unixtimestamps as real UTC based values (like "date -u ’+%s’").
Note
Make sure your database session runs in the same timezone in which the existing
dates have been stored (check your local timezone e.g. Oracle:"select sessiontimezonefrom dual;") if you are running the upgrade script. Additionally for your conveniencein Oracle you should set your session timestamp format to the value you want, e.g"alter session set nls_timestamp_format=’YYYY-MM-DD HH24:MI:SS’;" or similar.Now you can view entries from different Icinga installations in different time zoneswhich are stored in the same database and regardless from where you accessing it, allentries are returned in your local time zone.
Install the packages
You can install the packages from the ports or you take older packages (have a look at the
FreeBSD quickstart quide.
Install ports
You can install these ports by running the following commands (as root) but it is recommendedto use portupgrade or portmaster instead:
Please update your ports before doing so.
#> cd /usr/ports/devel/libtool/ && make all install clean
#> cd /usr/ports/graphics/jpeg && make all install clean
#> cd /usr/ports/graphics/png && make all install clean
#> cd /usr/ports/graphics/gd && make all install clean
Note
Please make sure you have Apache installed - the process will not be discussed here,however the lead is # cd /usr/ports/www/apache22 && make clean && make.
#> cd /usr/ports/devel/gmake && make all install clean
#> cd /usr/ports/devel/libltdl && make all install clean cd /usr/ports/databases/mysql51-server && make all install clean
#> cd /usr/ports/databases/libdbi-drivers && make all install clean
please choose the correct driver for the database used
PostgreSQL
#> cd /usr/ports/databases/postgresql84-server && make all install clean
#> cd /usr/ports/databases/libdbi-drivers && make all install clean
please choose the correct driver for the database used
Create Account Information
Become the root user.
45
Icinga and IDOUtils Quickstart on FreeBSD
-
8/18/2019 Icinga v17 En
46/727
$> su -l
Create a new icinga user account without a password and without the ability to log-in (set nopassword when asked):
#> adduser -D -w no -s nologin
For sending commands from the classic web interface to Icinga, you’ll need to create a newgroup icinga-cmd and add the webuser (www) and the Icingauser to this group:
#> pw groupadd -n icinga-cmd -M icinga,www
Download Icinga and the plugins
Change to your local source directory i.e. ~/src
#> mkdir ~/src
#> cd ~/src
Get the current source from the Icinga Website.
Don’t forget to download the Nagios Plugins.
Compile and install Icinga and IDOUtils
Extract the Icinga source code tarball (or change directory to the GIT snapshot)
#> cd ~/src/
#> tar xvzf icinga-1.7.tar.gz
#> cd icinga-1.7
Note
This absolute path is meant if we use the description ’/path/to/icinga-src/’.
Run the Icinga configure script. You will get help by using the --help flag.
#> ./configure --with-command-group=icinga-cmd \
--enable-idoutils CPPFLAGS=-I/usr/local/include \
CFLAGS="-I/usr/local/include -L/usr/local/lib" \
--with-dbi-lib=/usr/local/lib --with-dbi-inc=/usr/local/include
Important
Appending CPPFLAGS=-I/usr/local/include is important for the IDOUtils and the broker modul respectively.
Note
You should include CFLAGS=..." like specified above. Otherwise you might get the followinglines in icinga.log:
Error: Module ‘/usr/local/icinga/lib/idomod.so’ is using an old or unspecified version
of the event broker API. Module will be unloaded.
Event broker module ‘/usr/local/icinga/lib/idomod.so’ deinitialized successfully.
More details on this error can be found here.
46
Icinga and IDOUtils Quickstart on FreeBSD
http://www.icinga.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.nagiosplugins.org/http://www.mazej.net/icinga-idomod-o-is-using-an-old-or-unspecified-version-of-the-event-broker-api/http://www.mazej.net/icinga-idomod-o-is-using-an-old-or-unspecified-version-of-the-event-broker-api/http://www.mazej.net/icinga-idomod-o-is-using-an-old-or-unspecified-version-of-the-event-broker-api/http://www.nagiosplugins.org/http://www.icinga.org/
-
8/18/2019 Icinga v17 En
47/727
With SSL-encryption:
#> ./configure --with-command-group=icinga-cmd \
--enable-idoutils --enable-ssl CPPFLAGS=-I/usr/local/include \
--with-dbi-lib=/usr/local/lib --with-dbi-inc=/usr/local/include
Compile the Icinga source code. There is a separate option for IDOUtils (make idoutils) if you just
want to recompile this module. To see possible option just call "make".
#> gmake all
Install binaries, init script, sample config files, some eventhandlers, and set permissions on theexternal command directory.
#> make install
#> make install-init
#> make install-config
#> make install-eventhandlers
#> make install-commandmode
or shorter
#> make fullinstall
#> make install-config
Note
Starting with Icinga 1.5.0 make install-config is NOT included in makefullinstall anymore to avoid accidently overwriting of your config files.
Note
Starting with Icinga 1.7.0 make install-eventhandlers will install some eventhandler routines. To prevent undesired behaviour it is only included when you usemake fullinstall.
Note
The Icinga-API served as a database abstraction layer written in PHP. Starting withIcinga 1.5 it is replaced by an internal database abstraction layer so Icinga-API doesn’thave to be installed anymore.
Don’t start Icinga yet - there’s still more that needs to be done...
Customise Configuration
Sample configuration files have been installed using
#> gmake install-config
into /usr/local/icinga/etc/. You’ll need to make just one change before you proceed...
Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favourite editor and changethe email address associated with the icingaadmin contact definition to the address you’d like to
use for receiving alerts.
47
Icinga and IDOUtils Quickstart on FreeBSD
-
8/18/2019 Icinga v17 En
48/727
#> vi /usr/local/icinga/etc/objects/contacts.cfg
#> cd /usr/local/icinga/etc
#> mv idomod.cfg-sample idomod.cfg
#> mv ido2db.cfg-sample ido2db.cfg
If you compiled the IDOUtils with SSL then you have to activate SSL in idomod.cfg setting
use_ssl=1
output_type=tcpsocket
output=127.0.0.1
(adjust the IP address if your database is not running on localhost!) and in ido2db.cfg setting
use_ssl=1
socket_type=tcp
Note
Don’t forget to recompile all other idomod clients and to activate SSL otherwise you
will lose data!!!
Activate the idomod event broker module
Important
Under normal circumstances the following module definition is already present inthe modules subdirectory so there is no need to edit the main config file
define module{
module_name ido_mod
path /usr/local/icinga/lib/idomod.so
module_type neb args config_file=/usr/local/icinga/etc/idomod.cfg
}
This also means that a broker_module entry must not be enabled!
Compile database and IDOUtils
MySQL:
Create database, user, and permissions
Note
If you just installed the RDBMS like decribed above then you have to start thedatabase server before you can create a database. Having MySQL please use/usr/local/etc/rc.d/mysql-server start to start.
#> mysql -u root -p
mysql> CREATE DATABASE icinga;
GRANT USAGE ON *.* TO ’icinga’@’localhost’ IDENTIFIED BY ’icinga’
WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
GRANT SELECT , INSERT , UPDATE , DELETE
48
Icinga and IDOUtils Quickstart on FreeBSD
-
8/18/2019 Icinga v17 En
49/727
ON icinga.* TO ’icinga’@’localhost’;
FLUSH PRIVILEGES ;
quit
#> cd /path/to/icinga-src/module/idoutils/db/mysql
#> mysql -u root -p icinga < mysql.sql
#> vi /usr/local/icinga/etc/ido2db.cfg
db_servertype=mysql
db_port=3306
db_user=icinga
db_pass=icinga
PostgreSQL:
To Do
Install and configure the Classic Web Interface
Icinga ships with the Classic Web Interface ("the CGIs") which can be installed via
#> cd /path/to/icinga-src
#> make cgis
#> make install-cgis
#> make install-html
If you are interested in the new Icinga Web, please refer to Install Icinga Web Interface.
Install the Icinga Classic web config file in the Apache conf.d directory.
NoteThere is currently a bug in Icinga Makefile which directly prevents this make command,please edit Makefile file in Icinga source directory and change the line
$(INSTALL) -D -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
to
$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
#> make install-webconf
Create an icingaadmin account for logging into the Icinga classic web interface. If you want tochange it later, use the same command. Remember t