Icinga 1.6.1 Installation unter Ubuntu 12.04 Precise

Aus Thomas-Krenn-Wiki
Wechseln zu: Navigation, Suche
Hinweis: Bitte beachten Sie, dass dieser Artikel / diese Kategorie sich entweder auf ältere Software/Hardware Komponenten bezieht oder aus sonstigen Gründen nicht mehr gewartet wird.
Diese Seite wird nicht mehr aktualisiert und ist rein zu Referenzzwecken noch hier im Archiv abrufbar.

Die Icinga-Version 1.6.1 befindet sich in den Paketquellen von Ubuntu 12.04 LTS. Es kann daher einfach über apt-get install nach der Installation von Ubuntu 12.04 LTS Server aus den Repositories bezogen und installiert werden.

Installation

:~$ sudo apt-get install icinga
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common bsd-mailx icinga-cgi
  icinga-common icinga-core libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2
  libgd2-noxpm libjpeg-turbo8 libjpeg8 libmysqlclient18 libnet-snmp-perl libperl5.14 libpq5
  libradius1 libsensors4 libsnmp-base libsnmp15 libtalloc2 libtdb1 libwbclient0 mysql-common
  nagios-images nagios-plugins nagios-plugins-basic nagios-plugins-standard postfix samba-common
  samba-common-bin smbclient snmp ssl-cert whois
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom nagios-nrpe-plugin libgd-tools libcrypt-des-perl
  libdigest-hmac-perl libio-socket-inet6-perl lm-sensors snmp-mibs-downloader nagios3 procmail
  postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin dovecot-common postfix-cdb
  mail-reader cifs-utils openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common bsd-mailx icinga
  icinga-cgi icinga-common icinga-core libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
  libcap2 libgd2-noxpm libjpeg-turbo8 libjpeg8 libmysqlclient18 libnet-snmp-perl libperl5.14 libpq5
  libradius1 libsensors4 libsnmp-base libsnmp15 libtalloc2 libtdb1 libwbclient0 mysql-common
  nagios-images nagios-plugins nagios-plugins-basic nagios-plugins-standard postfix samba-common
  samba-common-bin smbclient snmp ssl-cert whois
0 upgraded, 41 newly installed, 0 to remove and 3 not upgraded.
Need to get 32.7 MB of archives.
After this operation, 96.0 MB of additional disk space will be used.
Do you want to continue [Y/n]?
[...]
Get:26 http://de.archive.ubuntu.com/ubuntu/ precise/universe icinga-common all 1.6.1-2 [65.3 kB]
Get:27 http://de.archive.ubuntu.com/ubuntu/ precise/universe icinga-core amd64 1.6.1-2 [287 kB]
Get:28 http://de.archive.ubuntu.com/ubuntu/ precise/universe icinga-cgi amd64 1.6.1-2 [1,920 kB]
Get:29 http://de.archive.ubuntu.com/ubuntu/ precise/universe icinga amd64 1.6.1-2 [1,348 B]
[...]

Konfigurationsdialoge

Die folgenden Ausgaben zeigen Beispiele für das Auswählen der Optionen in den Konfigurationsdialogen.

Postfix Konfiguration

          ┌───────────────────────────┤ Postfix Configuration ├───────────────────────────┐          
          │ Please select the mail server configuration type that best meets your needs.  │          
          │                                                                               │          
          │  No configuration:                                                            │          
          │   Should be chosen to leave the current configuration unchanged.              │          
          │  Internet site:                                                               │          
          │   Mail is sent and received directly using SMTP.                              │          
          │  Internet with smarthost:                                                     │          
          │   Mail is received directly using SMTP or by running a utility such           │          
          │   as fetchmail. Outgoing mail is sent using a smarthost.                      │          
          │  Satellite system:                                                            │          
          │   All mail is sent to another machine, called a 'smarthost', for delivery.    │          
          │  Local only:                                                                  │          
          │   The only delivered mail is the mail for local users. There is no network.   │          
          │                                                                               │          
          │ General type of mail configuration:                                           │          
          │                                                                               │          
          │                            No configuration                                   │          
          │                          * Internet Site *                                    │          
          │                            Internet with smarthost                            │          
          │                            Satellite system                                   │          
          │                            Local only                                         │          
          │                                                                               │          
          │                                                                               │          
          │                     <Ok>                         <Cancel>                     │          
          │                                                                               │          
          └───────────────────────────────────────────────────────────────────────────────┘          
  ┌──────────────────────────────────┤ Postfix Configuration ├───────────────────────────────────┐   
  │ The "mail name" is the domain name used to "qualify" _ALL_ mail addresses without a domain   │   
  │ name. This includes mail to and from <root>: please do not make your machine send out mail   │   
  │ from root@example.org unless root@example.org has told you to.                               │   
  │                                                                                              │   
  │ This name will also be used by other programs. It should be the single, fully qualified      │   
  │ domain name (FQDN).                                                                          │   
  │                                                                                              │   
  │ Thus, if a mail address on the local host is foo@example.org, the correct value for this     │   
  │ option would be example.org.                                                                 │   
  │                                                                                              │   
  │ System mail name:                                                                            │   
  │                                                                                              │   
  │ ubuntu-12-04.thomas-krenn.com_______________________________________________________________ │   
  │                                                                                              │   
  │                          <Ok>                              <Cancel>                          │   
  │                                                                                              │   
  └──────────────────────────────────────────────────────────────────────────────────────────────┘   

Icinga-CGI Konfiguration

      ┌──────────────────────────────┤ Configuring icinga-cgi ├───────────────────────────────┐      
      │ Please select which Apache servers should be configured for icinga.                   │      
      │                                                                                       │      
      │ If you would prefer to perform configuration manually, leave all servers unselected.  │      
      │                                                                                       │      
      │ Apache servers to configure for icinga:                                               │      
      │                                                                                       │      
      │    [*] apache2                                                                        │      
      │                                                                                       │      
      │                                                                                       │      
      │                                        <Ok>                                           │      
      │                                                                                       │      
      └───────────────────────────────────────────────────────────────────────────────────────┘      
  ┌──────────────────────────────────┤ Configuring icinga-cgi ├──────────────────────────────────┐   
  │ Please provide the password to be created with the "icingaadmin" user.                       │   
  │                                                                                              │   
  │ This is the username and password to use when connecting to the Icinga server after          │   
  │ completing the configuration. If you do not provide a password, you will have to configure   │   
  │ access to Icinga manually later on.                                                          │   
  │                                                                                              │   
  │ Icinga web administration password:                                                          │   
  │                                                                                              │   
  │ ***********_________________________________________________________________________________ │   
  │                                                                                              │   
  │                                            <Ok>                                              │   
  │                                                                                              │   
  └──────────────────────────────────────────────────────────────────────────────────────────────┘   
        ┌────────────────────────────┤ Configuring icinga-cgi ├─────────────────────────────┐        
        │ Please enter the same user password again to verify you have typed it correctly.  │        
        │                                                                                   │        
        │ Re-enter password to verify:                                                      │        
        │                                                                                   │        
        │ ***********______________________________________________________________________ │        
        │                                                                                   │        
        │                                      <Ok>                                         │        
        │                                                                                   │        
        └───────────────────────────────────────────────────────────────────────────────────┘        

External Commands

Damit Kommandos über das Webinterface ausgeführt werden dürfen sind einige Schritte erforderlich. Diese sind in /usr/share/doc/icinga/README.Debian auch beschrieben.

Zuerst wird die Option check_external_commands in der Konfigurationsdatei /etc/icinga/icinga.cfg auf 1 gesetzt:

# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Icinga should check
# for external commands (in the command file defined below).  By default
# Icinga will *not* check for external commands, just to be on the
# cautious side.  If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands

check_external_commands=1

Danach müssen noch die Dateiberechtigungen angepasst werden:

sudo /etc/init.d/icinga stop
sudo dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw
sudo dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga
sudo /etc/init.d/icinga start

Das könnte Sie auch interessieren

Icinga 2 NRPE Plugin
Icinga Web 2 mit Icinga 1.x verwenden
IPMI Sensor Monitoring Plugin Version 1.x