Skip to content

Instantly share code, notes, and snippets.

@dnsmichi
Last active July 17, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnsmichi/f4ce1c350ccc90e843d1252c63a4e311 to your computer and use it in GitHub Desktop.
Save dnsmichi/f4ce1c350ccc90e843d1252c63a4e311 to your computer and use it in GitHub Desktop.
icinga2 2.9 centos 6 docker
michi@imagine ~ $ sudo docker run -ti centos:6 bash
Unable to find image 'centos:6' locally
Trying to pull repository docker.io/library/centos ... 
sha256:bac053540cfdc5c034191d2f20207dc83f5336bca0bcdbb9d9a58a64ed30d4f3: Pulling from docker.io/library/centos
987d765a926d: Pull complete 
Digest: sha256:bac053540cfdc5c034191d2f20207dc83f5336bca0bcdbb9d9a58a64ed30d4f3
Status: Downloaded newer image for docker.io/centos:6
[root@03e2ed2c8b79 /]# yum install http://packages.icinga.com/epel/icinga-rpm-release-6-latest.noarch.rpm
Loaded plugins: fastestmirror, ovl
Setting up Install Process
icinga-rpm-release-6-latest.noarch.rpm                   | 4.3 kB     00:00     
Examining /var/tmp/yum-root-jy4exI/icinga-rpm-release-6-latest.noarch.rpm: icinga-rpm-release-6-2.el6.noarch
Marking /var/tmp/yum-root-jy4exI/icinga-rpm-release-6-latest.noarch.rpm to be installed
base                                                     | 3.7 kB     00:00     
base/primary_db                                          | 4.7 MB     00:01     
extras                                                   | 3.4 kB     00:00     
extras/primary_db                                        |  25 kB     00:00     
updates                                                  | 3.4 kB     00:00     
updates/primary_db                                       | 645 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package icinga-rpm-release.noarch 0:6-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch   Version    Repository                           Size
================================================================================
Installing:
 icinga-rpm-release noarch 6-2.el6    /icinga-rpm-release-6-latest.noarch 2.1 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total size: 2.1 k
Installed size: 2.1 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : icinga-rpm-release-6-2.el6.noarch                            1/1 
  Verifying  : icinga-rpm-release-6-2.el6.noarch                            1/1 

Installed:
  icinga-rpm-release.noarch 0:6-2.el6                                           

Complete!
[root@03e2ed2c8b79 /]# yum makecache
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: centos.schlundtech.de
 * extras: mirror.wiuwiu.de
 * updates: mirror.wiuwiu.de
base                                                     | 3.7 kB     00:00     
base/group_gz                                            | 242 kB     00:00     
base/filelists_db                                        | 6.4 MB     00:01     
base/other_db                                            | 2.8 MB     00:00     
extras                                                   | 3.4 kB     00:00     
extras/filelists_db                                      |  24 kB     00:00     
extras/prestodelta                                       | 1.1 kB     00:00     
extras/other_db                                          |  28 kB     00:00     
icinga-stable-release                                    | 2.5 kB     00:00     
icinga-stable-release/filelists_db                       | 741 kB     00:00     
icinga-stable-release/primary_db                         | 220 kB     00:00     
icinga-stable-release/other_db                           |  55 kB     00:00     
updates                                                  | 3.4 kB     00:00     
updates/filelists_db                                     | 390 kB     00:00     
updates/prestodelta                                      |  11 kB     00:00     
updates/other_db                                         | 8.5 MB     00:02     
Metadata Cache Created
[root@03e2ed2c8b79 /]# yum -y install icinga2
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.schlundtech.de
 * extras: mirror.wiuwiu.de
 * updates: mirror.wiuwiu.de
Resolving Dependencies
--> Running transaction check
---> Package icinga2.x86_64 0:2.9.0-1.el6.icinga will be installed
--> Processing Dependency: icinga2-bin = 2.9.0-1.el6.icinga for package: icinga2-2.9.0-1.el6.icinga.x86_64
--> Running transaction check
---> Package icinga2-bin.x86_64 0:2.9.0-1.el6.icinga will be installed
--> Processing Dependency: icinga2-libs = 2.9.0-1.el6.icinga for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Processing Dependency: libboost_thread.so.1.53.0()(64bit) for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Processing Dependency: libedit.so.0()(64bit) for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Processing Dependency: libboost_regex.so.1.53.0()(64bit) for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Processing Dependency: libboost_system.so.1.53.0()(64bit) for package: icinga2-bin-2.9.0-1.el6.icinga.x86_64
--> Running transaction check
---> Package icinga2-libs.x86_64 0:2.9.0-1.el6.icinga will be installed
--> Processing Dependency: icinga2-common = 2.9.0-1.el6.icinga for package: icinga2-libs-2.9.0-1.el6.icinga.x86_64
---> Package libboost_program_options1_53_0.x86_64 0:1.53.0-0 will be installed
--> Processing Dependency: boost-license1_53_0 for package: libboost_program_options1_53_0-1.53.0-0.x86_64
---> Package libboost_regex1_53_0.x86_64 0:1.53.0-0 will be installed
--> Processing Dependency: libicui18n.so.42()(64bit) for package: libboost_regex1_53_0-1.53.0-0.x86_64
--> Processing Dependency: libicuuc.so.42()(64bit) for package: libboost_regex1_53_0-1.53.0-0.x86_64
--> Processing Dependency: libicudata.so.42()(64bit) for package: libboost_regex1_53_0-1.53.0-0.x86_64
---> Package libboost_system1_53_0.x86_64 0:1.53.0-0 will be installed
---> Package libboost_thread1_53_0.x86_64 0:1.53.0-0 will be installed
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
--> Running transaction check
---> Package boost-license1_53_0.x86_64 0:1.53.0-0 will be installed
---> Package icinga2-common.x86_64 0:2.9.0-1.el6.icinga will be installed
---> Package libicu.x86_64 0:4.2.1-14.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch   Version              Repository             Size
================================================================================
Installing:
 icinga2                x86_64 2.9.0-1.el6.icinga   icinga-stable-release  10 k
Installing for dependencies:
 boost-license1_53_0    x86_64 1.53.0-0             icinga-stable-release 2.2 k
 icinga2-bin            x86_64 2.9.0-1.el6.icinga   icinga-stable-release 3.7 M
 icinga2-common         x86_64 2.9.0-1.el6.icinga   icinga-stable-release 149 k
 icinga2-libs           x86_64 2.9.0-1.el6.icinga   icinga-stable-release  86 k
 libboost_program_options1_53_0
                        x86_64 1.53.0-0             icinga-stable-release 110 k
 libboost_regex1_53_0   x86_64 1.53.0-0             icinga-stable-release 275 k
 libboost_system1_53_0  x86_64 1.53.0-0             icinga-stable-release 6.4 k
 libboost_thread1_53_0  x86_64 1.53.0-0             icinga-stable-release  27 k
 libedit                x86_64 2.11-4.20080712cvs.1.el6
                                                    base                   74 k
 libicu                 x86_64 4.2.1-14.el6         base                  4.9 M

Transaction Summary
================================================================================
Install      11 Package(s)

Total download size: 9.3 M
Installed size: 39 M
Downloading Packages:
(1/11): boost-license1_53_0-1.53.0-0.x86_64.rpm          | 2.2 kB     00:00     
(2/11): icinga2-2.9.0-1.el6.icinga.x86_64.rpm            |  10 kB     00:00     
(3/11): icinga2-bin-2.9.0-1.el6.icinga.x86_64.rpm        | 3.7 MB     00:00     
(4/11): icinga2-common-2.9.0-1.el6.icinga.x86_64.rpm     | 149 kB     00:00     
(5/11): icinga2-libs-2.9.0-1.el6.icinga.x86_64.rpm       |  86 kB     00:00     
(6/11): libboost_program_options1_53_0-1.53.0-0.x86_64.r | 110 kB     00:00     
(7/11): libboost_regex1_53_0-1.53.0-0.x86_64.rpm         | 275 kB     00:00     
(8/11): libboost_system1_53_0-1.53.0-0.x86_64.rpm        | 6.4 kB     00:00     
(9/11): libboost_thread1_53_0-1.53.0-0.x86_64.rpm        |  27 kB     00:00     
(10/11): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm     |  74 kB     00:00     
(11/11): libicu-4.2.1-14.el6.x86_64.rpm                  | 4.9 MB     00:01     
--------------------------------------------------------------------------------
Total                                           3.4 MB/s | 9.3 MB     00:02     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 Package: centos-release-6-9.el6.12.3.x86_64 (@CentOS/6.9)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 34410682: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ICINGA
Importing GPG key 0x34410682:
 Userid : Icinga Open Source Monitoring (Build server) <info@icinga.org>
 Package: icinga-rpm-release-6-2.el6.noarch (@/icinga-rpm-release-6-latest.noarch)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-ICINGA
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : boost-license1_53_0-1.53.0-0.x86_64                         1/11 
  Installing : libboost_system1_53_0-1.53.0-0.x86_64                       2/11 
  Installing : libboost_thread1_53_0-1.53.0-0.x86_64                       3/11 
  Installing : libboost_program_options1_53_0-1.53.0-0.x86_64              4/11 
  Installing : icinga2-common-2.9.0-1.el6.icinga.x86_64                    5/11 
  Installing : icinga2-libs-2.9.0-1.el6.icinga.x86_64                      6/11 
  Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64                     7/11 
  Installing : libicu-4.2.1-14.el6.x86_64                                  8/11 
  Installing : libboost_regex1_53_0-1.53.0-0.x86_64                        9/11 
  Installing : icinga2-bin-2.9.0-1.el6.icinga.x86_64                      10/11 
  Installing : icinga2-2.9.0-1.el6.icinga.x86_64                          11/11 
  Verifying  : libicu-4.2.1-14.el6.x86_64                                  1/11 
  Verifying  : libedit-2.11-4.20080712cvs.1.el6.x86_64                     2/11 
  Verifying  : icinga2-2.9.0-1.el6.icinga.x86_64                           3/11 
  Verifying  : icinga2-bin-2.9.0-1.el6.icinga.x86_64                       4/11 
  Verifying  : icinga2-common-2.9.0-1.el6.icinga.x86_64                    5/11 
  Verifying  : libboost_program_options1_53_0-1.53.0-0.x86_64              6/11 
  Verifying  : libboost_system1_53_0-1.53.0-0.x86_64                       7/11 
  Verifying  : libboost_thread1_53_0-1.53.0-0.x86_64                       8/11 
  Verifying  : icinga2-libs-2.9.0-1.el6.icinga.x86_64                      9/11 
  Verifying  : boost-license1_53_0-1.53.0-0.x86_64                        10/11 
  Verifying  : libboost_regex1_53_0-1.53.0-0.x86_64                       11/11 

Installed:
  icinga2.x86_64 0:2.9.0-1.el6.icinga                                           

Dependency Installed:
  boost-license1_53_0.x86_64 0:1.53.0-0                                         
  icinga2-bin.x86_64 0:2.9.0-1.el6.icinga                                       
  icinga2-common.x86_64 0:2.9.0-1.el6.icinga                                    
  icinga2-libs.x86_64 0:2.9.0-1.el6.icinga                                      
  libboost_program_options1_53_0.x86_64 0:1.53.0-0                              
  libboost_regex1_53_0.x86_64 0:1.53.0-0                                        
  libboost_system1_53_0.x86_64 0:1.53.0-0                                       
  libboost_thread1_53_0.x86_64 0:1.53.0-0                                       
  libedit.x86_64 0:2.11-4.20080712cvs.1.el6                                     
  libicu.x86_64 0:4.2.1-14.el6                                                  

Complete!
[root@03e2ed2c8b79 /]# bash -x /etc/init.d/icinga2 status
+ SYSCONFIGFILE=/etc/sysconfig/icinga2
+ '[' -f /etc/sysconfig/icinga2 ']'
+ . /etc/sysconfig/icinga2
+ : icinga
+ : icinga
+ : icingacmd
+ : /usr/sbin/icinga2
+ : /etc/icinga2/icinga2.conf
+ : /var/log/icinga2/error.log
+ : /var/log/icinga2/startup.log
+ : /var/run/icinga2/icinga2.pid
+ '[' -f /etc/default/icinga2 ']'
+ test -x /usr/sbin/icinga2
+ '[' '!' -e /etc/icinga2/icinga2.conf ']'
+ getent passwd icinga
+ getent group icinga
+ getent group icingacmd
+ '[' -f /etc/rc.d/init.d/functions ']'
+ '[' -f /etc/init.d/functions ']'
+ case "$1" in
+ status
+ printf 'Icinga 2 status: '
Icinga 2 status: + '[' '!' -e /var/run/icinga2/icinga2.pid ']'
+ echo 'Not running'
Not running
+ exit 7
[root@03e2ed2c8b79 /]# bash -x /etc/init.d/icinga2 start 
+ SYSCONFIGFILE=/etc/sysconfig/icinga2
+ '[' -f /etc/sysconfig/icinga2 ']'
+ . /etc/sysconfig/icinga2
+ : icinga
+ : icinga
+ : icingacmd
+ : /usr/sbin/icinga2
+ : /etc/icinga2/icinga2.conf
+ : /var/log/icinga2/error.log
+ : /var/log/icinga2/startup.log
+ : /var/run/icinga2/icinga2.pid
+ '[' -f /etc/default/icinga2 ']'
+ test -x /usr/sbin/icinga2
+ '[' '!' -e /etc/icinga2/icinga2.conf ']'
+ getent passwd icinga
+ getent group icinga
+ getent group icingacmd
+ '[' -f /etc/rc.d/init.d/functions ']'
+ '[' -f /etc/init.d/functions ']'
+ case "$1" in
+ checkconfig start fail
+ printf 'Checking configuration: '
Checking configuration: + /usr/sbin/icinga2 daemon -c /etc/icinga2/icinga2.conf -C
+ echo Done
Done
+ '[' xstart = x ']'
+ start
+ printf 'Starting Icinga 2: '
Starting Icinga 2: + /usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2
+ /usr/sbin/icinga2 daemon -c /etc/icinga2/icinga2.conf -d -e /var/log/icinga2/error.log
+ echo Done
Done
+ exit 0
[root@03e2ed2c8b79 /]# bash -x /etc/init.d/icinga2 status
+ SYSCONFIGFILE=/etc/sysconfig/icinga2
+ '[' -f /etc/sysconfig/icinga2 ']'
+ . /etc/sysconfig/icinga2
+ : icinga
+ : icinga
+ : icingacmd
+ : /usr/sbin/icinga2
+ : /etc/icinga2/icinga2.conf
+ : /var/log/icinga2/error.log
+ : /var/log/icinga2/startup.log
+ : /var/run/icinga2/icinga2.pid
+ '[' -f /etc/default/icinga2 ']'
+ test -x /usr/sbin/icinga2
+ '[' '!' -e /etc/icinga2/icinga2.conf ']'
+ getent passwd icinga
+ getent group icinga
+ getent group icingacmd
+ '[' -f /etc/rc.d/init.d/functions ']'
+ '[' -f /etc/init.d/functions ']'
+ case "$1" in
+ status
+ printf 'Icinga 2 status: '
Icinga 2 status: + '[' '!' -e /var/run/icinga2/icinga2.pid ']'
++ cat /var/run/icinga2/icinga2.pid
+ pid=231
+ icinga2 internal signal -s SIGCHLD -p 231
+ echo Running
Running
+ exit 0
[root@03e2ed2c8b79 /]# less /var/log/icinga2/icinga2.log 


[2018-07-17 17:10:27 +0000] information/CheckerComponent: 'checker' started.
[2018-07-17 17:10:27 +0000] information/NotificationComponent: 'notification' started.
[2018-07-17 17:10:27 +0000] information/ConfigItem: Activated all objects.
[2018-07-17 17:10:27 +0000] information/ConfigItem: Committing config item(s).
[2018-07-17 17:10:27 +0000] information/ConfigItem: Instantiated 1 Downtime.
[2018-07-17 17:10:27 +0000] information/ConfigItem: Triggering Start signal for config items
[2018-07-17 17:10:27 +0000] information/ConfigItem: Activated all objects.
[2018-07-17 17:10:39 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!disk' (PID: 312, arguments: '/usr/lib64/nagios/plugins/check_disk' '-c' '10%' '-w' '20%' '-X' 'none' '-X' 'tmpfs' '-X' 
'sysfs' '-X' 'proc' '-X' 'configfs' '-X' 'devtmpfs' '-X' 'devfs' '-X' 'mtmfs' '-X' 'tracefs' '-X' 'cgroup' '-X' 'fuse.gvfsd-fuse' '-X' 'fuse.gvfs-fuse-daemon' '-X' 'fdescfs' '-X' 'overlay' '-X' 'nsfs' '-m') term
inated with exit code 128, output: execvpe(/usr/lib64/nagios/plugins/check_disk) failed: No such file or directory

[2018-07-17 17:10:43 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!load' (PID: 313, arguments: '/usr/lib64/nagios/plugins/check_load' '-c' '10,6,4' '-w' '5,4,3') terminated with exit cod
e 128, output: execvpe(/usr/lib64/nagios/plugins/check_load) failed: No such file or directory

[2018-07-17 17:10:47 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!disk /' (PID: 314, arguments: '/usr/lib64/nagios/plugins/check_disk' '-c' '10%' '-w' '20%' '-X' 'none' '-X' 'tmpfs' '-X
' 'sysfs' '-X' 'proc' '-X' 'configfs' '-X' 'devtmpfs' '-X' 'devfs' '-X' 'mtmfs' '-X' 'tracefs' '-X' 'cgroup' '-X' 'fuse.gvfsd-fuse' '-X' 'fuse.gvfs-fuse-daemon' '-X' 'fdescfs' '-X' 'overlay' '-X' 'nsfs' '-m' '-p
' '/') terminated with exit code 128, output: execvpe(/usr/lib64/nagios/plugins/check_disk) failed: No such file or directory

[2018-07-17 17:10:50 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!ping4' (PID: 315, arguments: '/usr/lib64/nagios/plugins/check_ping' '-4' '-H' '127.0.0.1' '-c' '200,15%' '-w' '100,5%')
 terminated with exit code 128, output: execvpe(/usr/lib64/nagios/plugins/check_ping) failed: No such file or directory

[2018-07-17 17:10:55 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!swap' (PID: 316, arguments: '/usr/lib64/nagios/plugins/check_swap' '-c' '25%' '-w' '50%') terminated with exit code 128
, output: execvpe(/usr/lib64/nagios/plugins/check_swap) failed: No such file or directory

[2018-07-17 17:11:00 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!procs' (PID: 317, arguments: '/usr/lib64/nagios/plugins/check_procs' '-c' '400' '-w' '250') terminated with exit code 1
28, output: execvpe(/usr/lib64/nagios/plugins/check_procs) failed: No such file or directory

[2018-07-17 17:11:04 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!users' (PID: 318, arguments: '/usr/lib64/nagios/plugins/check_users' '-c' '50' '-w' '20') terminated with exit code 128
, output: execvpe(/usr/lib64/nagios/plugins/check_users) failed: No such file or directory

[2018-07-17 17:11:07 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!disk' (PID: 319, arguments: '/usr/lib64/nagios/plugins/check_disk' '-c' '10%' '-w' '20%' '-X' 'none' '-X' 'tmpfs' '-X' 
'sysfs' '-X' 'proc' '-X' 'configfs' '-X' 'devtmpfs' '-X' 'devfs' '-X' 'mtmfs' '-X' 'tracefs' '-X' 'cgroup' '-X' 'fuse.gvfsd-fuse' '-X' 'fuse.gvfs-fuse-daemon' '-X' 'fdescfs' '-X' 'overlay' '-X' 'nsfs' '-m') term
inated with exit code 128, output: execvpe(/usr/lib64/nagios/plugins/check_disk) failed: No such file or directory

[2018-07-17 17:11:12 +0000] warning/PluginCheckTask: Check command for object '03e2ed2c8b79!load' (PID: 320, arguments: '/usr/lib64/nagios/plugins/check_load' '-c' '10,6,4' '-w' '5,4,3') terminated with exit cod
e 128, output: execvpe(/usr/lib64/nagios/plugins/check_load) failed: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment