Install IDOUtils addon IDOUtils, an addon of icinga, to save data to the database. In this article, I try to use mysql server, and the mysql server has been installed on another machine. The sever of icinga has been installed before. 1. first install the program [plain] apt-get install mysql-client libdbi1 libdbi-dev libdbd-mysql 2 required to access mysql. log ON to the mysql server and run the following command to create the user 'icinca' and password: [plain] mysql> grant all privileges on *. * TO 'icinca' @ '%' identified by '000000' with grant option; Query OK, 0 rows affected (770328 sec) 3. go to the icinga source code directory, clear and recompile [plain] cd/usr/src/icinga-1.9.0 make clean. /configure -- with-command-group = icinga-cmd -- enable-idoutils Use SSL. Some important information will be generated and saved for future convenience: [plain] General Options: ------------------------- Icinga executable: icinga Icinga user/group: icinga, icinga Command user/group: icinga, icinga-cmd Apache user/group: www-data, www-data Embedded Perl: no Event Broker: yes ido2db lockfile: $ {prefix}/var/ido2db. lock ido sockfile: $ {prefix}/var/ido. sock idomod tempfile: $ {prefix}/var/idomod. tmp Build IDOUtils: libdbi, instance_name = Default libdbi driver dir:/usr/local/lib/dbd Install $ {prefix}:/usr/local/icinga Lock file :$ {prefix}/var/icinga. lock Temp file:/tmp/icinga. tmp Chk file: $ {prefix}/var/icinga. chk HTTP auth file: $ {prefix}/etc/htpasswd. users Lib directory: $ {exec_prefix}/lib Bin directory: $ {exec_prefix}/bin Plugin directory: $ {exec_prefix}/libexec Eventhandler directory: $ {exec_prefix}/libexec/eventhandlers Log Directory: $ {prefix}/var Check result directory: $ {prefix}/var/spool/checkresults Temp directory:/tmp State directory: $ {prefix}/var Ext Cmd file directory: $ {prefix}/var/rw Init directory:/etc/init. d Apache conf. d directory:/etc/apache2/conf. d Apache config file:/etc/apache2/conf. d/icinga. conf Mail program:/bin/mail Host OS: linux-gnu Environment Prefix: ICINGA _ Web Interface Options :----- ------------------- Html url: http: // localhost/icinga/cgi url: http: // localhost/icinga/cgi-bin/Main URL: http: // localhost/icinga/cgi-bin/tac. cgi 4. then run make all to compile 5. stop icinga [plain] service icinga stop 6. install [plain] make fullinstall make install-config 7. modify the email address of the contact object in the following file as your address:/usr/local/icinga/etc/objects/contacts. cfg 8. some configurations are not described in the official document: Copy them from the sample, [plain] root @ icinga:/usr/local/icin Ga/etc/modules # cp idoutils. cfg-sample idoutils. cfg content does not need to be modified: [plain] define module {module_name idole_type neb path/usr/local/icinga/lib/idomod. so args config_file =/usr/local/icinga/etc/idomod. cfg} creates a link: [plain] ln-s/usr/lib/icinga/idomod. so/usr/sbin/then copy idood from the sample. cfg file [plain] root @ icinga:/usr/local/icinga/etc # cp idomod. cfg-sample idomod. cfg 9. create a database. First copy the database file to the database server: [plain] root @ icinga:/usr/src/icinga-1.9.0/module/idoutils # scp-r db root@10.112.18.182: /opt/then log on to the mysql server, create a database, and then import the database file: [plain] root @ gitlab:/opt/db/mysql # mysql-u root-p Enter password: welcome to the MySQL monitor. commands end with; or \ g. your MySQL connection id is 104 Server version: 5.5.28-0ubuntu0. 12.10.2 (Ubuntu) Copyright (c) 2000,201 2, Oracle and/or its affiliates. all rights reserved. oracle is a registered trademark of Oracle Corporation and/or its affiliates. other names may be trademarks of their respective owners. type 'help; 'or' \ H' for help. type '\ C' to clear the current input statement. mysql> create database icinga; Query OK, 1 row affected (0.02 sec) mysql> quit Bye root @ gitlab: /opt/db/mysql # mysql-u root-p icinga <mysql. SQL Enter password: 10. configure the icinga server to connect to the database [plain] root @ icinga:/usr/local/icinga/etc # cp ido2db. cfg-sample ido2db. cfg then sets four options: [plain] db_user = icinga db_pass = 770328 db_servertype = mysql db_host = 10.112.18.182 11. start the service: [plain] root @ icinga:/usr/local/icinga/var # service ido2db start Starting ido2db: done. root @ icinga:/usr/local/icinga/var # service icinga start 12. view the log:/usr/local/icinga/var/icinga. log File: [plain] [1368673816] idomod: Successfully connected to data sink. 289 queued items to flush. [1368673816] idomod: Successfully flushed 289 queued items to data sink. [1, 1368673816] Successfully shutdown... (PID = 8697) [1368673816] idomod: Shutdown complete. [1368673816] Event broker module '/usr/local/icinga/lib/idomod. so 'initialized successfully. [1368673816] Icinga 1.9.0 starting... (PID = 8780) [1368673816] Local time is Thu May 16 11:10:16 CST 2013 [1368673816] log version: 2.0 [1368673816] idomod: IDOMOD 1.9.0 () Copyright (c) 2005-2008 Ethan Galstad, Copyright (c) 2009-2013 Icinga Development Team (https://www.icinga.org) [1368673816] idomod: Successfully connected to data sink. 0 queued items to flush. [1368673816] Event broker module 'iomod' version' 1. 9.0 'from'/usr/local/icinga/lib/idomod. so 'initialized successfully. [2, 1368673816] Finished daemonizing... (New PID = 8785) [1368673816] Event loop started... view System logs:/var/log/syslog [plain] May 16 11:10:16 icinga: idomod: IDOMOD 1.9.0 () Copyright (c) 2005-2008 Ethan Galstad, Copyright (c) 2009-2013 Icinga Development Team (https://www.icinga.org) May 16 11:10:16 icinga ido2db: Client connected, data available. may 16 11:10:16 icinga: idomod: Successfully connected to data sink. 0 queued items to flush. may 16 11:10:16 icinga ido2db: Handling client connection... may 16 11:10:16 icinga: Event broker module 'mod' version' 1. 9.0 'from'/usr/local/icinga/lib/idomod. so 'initialized successfully. may 16 11:10:16 icinga: Finished daemonizing... (New PID = 8785) May 16 11:10:16 icinga ido2db: Successfully connected to mysql database May 16 11:10:16 icinga: Event loop started... may 16 11:10:16 icinga ido2db: Successfully disconnected from mysql database May 16 11:10:16 icinga ido2db: Successfully shutdown... (PID = 1, 8771)