Preparations before installing check_mk on icinga: 1. I have installed icinga and used mysql. check_mk requires that the full-featured nagios be installed in advance. It seems that my functions are full. Now icinga is running normally. 2. Check whether the external command is normal. Open the web page, log on, check the ping service of localhost, and click the drop-down box in the upper right corner: Click the Submit button, and perform subsequent operations. Then return to the page and find that the Ping service is disabled. So external command works normally. 3. Check python. UBuntu server has been installed, which is just version 2.x. [Plain] python -- version Python 2.7.3 4. xinetd was installed before NSCA was installed. Start installation: 1. download [plain] root @ icinga:/opt # wget http://mathias-kettner.com/download/check_mk-1.2.2p1.tar.gz 2. unzip: [plain] tar zxvf check_mk-1.2.2p1.tar.gz 3. run. /setup. sh program, enter the interactive installation process, generally use the default value. The following is my default option: [plain] You have chosen the following directories: executable programs/usr/bin Check_MK configuration/etc/check_mk Check_MK software/usr/share/check_mk documentation/usr/share/doc/check_mk check manuals/usr/share/doc/check_mk/ checks working directory of check_mk/var/lib/check_mk extensions for agents/usr/lib/check_mk_agent configuration dir for agents/etc/check_mk Name of Nagios u Ser icinga User of Apache process www-data Common group of Nagios + Apache icinga-cmd Nagios binary/usr/local/icinga/bin/icinga Nagios main configuration file/usr/local/icinga /etc/icinga. cfg Nagios object directory/usr/local/icinga/etc/conf. d Nagios startskript/etc/init. d/icinga Nagios command pipe/usr/local/icinga/var/rw/icinga. cmd Check results directory/usr/local/icinga/var/spool/checkresul Ts Nagios status file/usr/local/icinga/var/status. dat Path to check_icmp/usr/lib/nagios/plugins/check_icmp URL Prefix for Web addons/Apache config dir/etc/apache2/conf. d HTTP authentication file/usr/local/icinga/etc/htpasswd. users HTTP AuthName Icinga Access PNP4Nagios templates/usr/share/check_mk/pnp-templates compile livestatus module yes check_mk's binary modules/usr/lib/check_mk Unix s Ocket for Livestatus/usr/local/icinga/var/rw/live Backends for other systems/usr/share/check_mk/livestatus Install Event Console no ~ /. Check_mk_setup.conf file. If you want to reinstall the file, you can delete the file first. 4. after restarting the apache2 and icinga services, go to the webpage: http: // 10.112.18.111/check_mk and see the error message: [plain] Check_mk: incomplete Apache2 Installation You need mod_python in order to run the web interface of check_mk. please install mod_python and restart Apache. now we will install the mod_python module of Apache2. [plain] apt-get install libapache2-mod-python restart apache2. now you see the page, but there are two errors:
5. Install the agent for local monitoring regardless of the preceding error. [Plain] wget http://mathias-kettner.com/download/check-mk-agent_1.2.2p1-2_all.deb [plain] dpkg-I check-mk-agent_1.2.2p1-2_all.deb Selecting previusly unselected package check-mk-agent. (Reading database... 65470 files and directories currently installed .) unpacking check-mk-agent (from check-mk-agent_1.2.2p1-2_all.deb )... setting up check-mk-agent (1.2.2p1-2 )... reloading xinetd... 6. modify the monitored hos T list, edit/etc/check_mk/main. mk file with the following content: [plain] # Put your host names here all_hosts = ['localhost'] 7. check that check_mk reads all hosts and performs detection. 11 detection services are created below. [Plain] cmk-I cpu. loads 1 new checks cpu. threads 1 new checks df 2 new checks diskstat 1 new checks kernel 3 new checks kernel. util 1 new checks lnx_if 1 new checks mem. used 1 new checks mounts 2 new checks tcp_conn_stats 1 new checks uptime 1 new checks 8. then, use check_mk-O to automatically modify the configuration file of icinga: [plain] check_mk-O Generating Nagios configuration... OK Validating Nagios configuration... ERROR: Icinga 1.9.0 Copyright (c) 2009-2013 Icinga Development Team (http://www.icinga.org) Copyright (c) 2009-2013 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 05-07-2013 License: GPL Reading configuration data... read main config file okay... processing object config directory '/usr/local/icinga/etc/conf. d '... processing object config file '/usr/local /Icinga/etc/conf. d/check_mk_objects.cfg '... processing object config file '/usr/local/icinga/etc/conf. d/check_mk_templates.cfg '... processing object config file '/usr/local/icinga/etc/objects/commands. cfg '... processing object config file '/usr/local/icinga/etc/objects/contacts. cfg '... processing object config file '/usr/local/icinga/etc/objects/timeperiods. cfg '... processing object config file '/ Usr/local/icinga/etc/objects/templates. cfg '... processing object config file '/usr/local/icinga/etc/objects/localhost. cfg '... warning: Duplicate definition found for host 'localhost' (config file '/usr/local/icinga/etc/objects/localhost. cfg ', starting on line 23) Error: cocould not add object property in file'/usr/local/icinga/etc/objects/localhost. cfg 'on line 27. error processing object config fi Les! * **> One or more problems was encountered while processing the config files... check your configuration file (s) to ensure that they contain valid directives and data definitions. if you are upgrading from a previous version of Icinga, you shocould be aware that some variables/definitions may have been removed or modified in this version. make sure to read the HTML documentation regarding the config Files, as well as the 'whats new' section and the Changelog CHANGES section as well to find out what has changed. Nagios configuration is invalid. Rolling back. An error is reported. Because icinga has localhost configuration by default. The simplest solution is to comment out the host definition of localhost in the following file [plain]/usr/local/icinga/etc/objects/localhost. cfg [plain] # define host {# use linux-server; Name of host template to use #; This host definition will inherit all variables that are defined #; in (or inherited) the linux-server host template definition. # host_name localhost # alias localhost # address 127.0.0.1 #} Run check_mk-O again. [Plain] root @ icinga:/etc/check_mk # check_mk-O Generating Nagios configuration... OK Validating Nagios configuration... OK Precompiling host checks... OK Reloading Nagios... OK