关注于系统高可用、网站架构
分类: LINUX
2012-05-21 15:02:11
Create a new icinga user account and give it a password:
On some distributions you'll need to add the group in a single step:
For sending commands from the classic web interface to Icinga, you'll need to create a new group icinga-cmd. Add the webuser and the Icinga user to this group:
Compile the Icinga source code. To see available options, only use "make".
Install binaries, init script, sample config files and set permissions on the external command directory.
Edit the /usr/local/icinga/etc/objects/contacts.cfg config file with your favourite editor and change the email address associated with the icingaadmin contact definition to the address you'd like to use for receiving alerts.
Configure the Classic Web Interface
Icinga ships with the Classic Web Interface ("the CGIs") which can be installed via
Install the Icinga Classic web config file in the Apache conf.d directory.
Create an icingaadmin account for logging into the Icinga classic web interface. If you want to change it later, use the same command. Remember the password you assign to this account - you'll need it later.
If you want to change it later or want to add another user, use the following command:
Compile and Install the Nagios Plugins
Extract the Nagios plugins source code tarball.
Compile and install the plugins by changing install directory to /usr/local/icinga
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 Server Error" messages when you try to invoke the Icinga-CGIs.
Check if SELinux runs in enforcing mode
Set SELinux in "permissive" mode
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 following commands to run the CGIs in enforcing/targeted mode:
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
Verify the sample Icinga configuration files.
Instead of specifying the paths to binary and config file you can issue
which results in an OK message if everything is fine or several lines which show the location of the error(s).
If there are no errors, start Icinga.
Fedora/RHEL/CentOS/Ubuntu
Login to the Classic Web Interface
You should now be able to access the Icinga classic web interface at the URL below. You'll be prompted for the username ( icingaadmin) and password you specified earlier.