Hello All,
today I've tried to install manubulon-snmp plugins into our test instance of Icinga2. Everything went OK until I got to the step where i have to restart Icinga2 deamon, so that the changes made during installation would became effective. At that point systemctl just returns error Job for icinga2.service failed because the control process exited with error code. Steps taken during installation of plugin and full systemctl error output are bellow.
Any help will be greatly appreciated!
Installations steps:
- ##Check if prereqs are installed on server, if not install them
- [root@icinga ~]# yum install perl
- Package 4:perl-5.16.3-291.el7.x86_64 already installed and latest version
- Nothing to do
- [root@icinga ~]# yum install perl-Net-SNMP
- Installed:
- perl-Net-SNMP.noarch 0:6.0.1-7.el7
- Dependency Installed:
- perl-Crypt-DES.x86_64 0:2.05-20.el7 perl-Digest.noarch 0:1.17-245.el7
- perl-Digest-HMAC.noarch 0:1.03-5.el7 perl-Digest-MD5.x86_64 0:2.52-3.el7
- perl-Digest-SHA.x86_64 1:5.85-3.el7 perl-Digest-SHA1.x86_64 0:2.13-9.el7
- perl-Socket6.x86_64 0:0.23-15.el7
- Complete!
- [root@icinga ~]# yum install perl-Getopt-Long
- Package perl-Crypt-DES-2.05-20.el7.x86_64 already installed and latest version
- Nothing to do
- [root@icinga ~]# yum install perl-Crypt-Rijndael
- Installed:
- perl-Crypt-Rijndael.x86_64 0:1.12-1.el7
- Complete!
- [root@icinga ~]# yum install perl-Digest-HMAC
- Package perl-Digest-HMAC-1.03-5.el7.noarch already installed and latest version
- Nothing to do
- [root@icinga manubulon]# ll /usr/bin/perl*
- -rwxr-xr-x. 2 root root 11408 Nov 6 2016 /usr/bin/perl
- -rwxr-xr-x. 2 root root 11408 Nov 6 2016 /usr/bin/perl5.16.3
- -rwxr-xr-x. 2 root root 43955 Nov 6 2016 /usr/bin/perlbug
- -rwxr-xr-x. 1 root root 203 Jun 10 2014 /usr/bin/perldoc
- -rwxr-xr-x. 2 root root 43955 Nov 6 2016 /usr/bin/perlthanks
- ##Create folder in /tmp for git clone of manubulon-snmp plugin
- [root@icinga tmp]# cd /tmp/manubulon/
- [root@icinga manubulon]# mkdir /usr/lib64/nagios/manubulon-snmp
- [root@icinga manubulon]# git clone https://github.com/dnsmichi/manubulon-snmp.git
- Cloning into 'manubulon-snmp'...
- remote: Counting objects: 802, done.
- remote: Total 802 (delta 0), reused 0 (delta 0), pack-reused 802
- Receiving objects: 100% (802/802), 403.37 KiB | 0 bytes/s, done.
- Resolving deltas: 100% (427/427), done.
- [root@icinga manubulon]# cd manubulon-snmp/plugins/
- #Run the plugin installation script
- [root@icinga plugins]# ./install.sh
- ###### Manubulon snmp scripts installer ######
- Will install all script(s)
- What is your perl location ? [/usr/bin/perl]
- Net::SNMP module version is v6.0.1 [OK]
- Module Getopt::Long found [OK]
- What is your monitoring plugin location ?
- /usr/lib64/nagios/manubulon-snmp
- Where do you want the plugins to put temporary data (only used by some plugins) ?
- Icinga user must be able to write files in it [/tmp]
- Will now install all script(s) :
- in directory : /usr/lib64/nagios/manubulon-snmp
- perl : /usr/bin/perl
- temp directory : /tmp
- OK ? [Y/n]y
- Installing check_snmp_boostedge.pl : OK
- Installing check_snmp_css.pl : OK
- Installing check_snmp_linkproof_nhr.pl : OK
- Installing check_snmp_nsbox.pl : OK
- Installing check_snmp_vrrp.pl : OK
- Installing check_snmp_cpfw.pl : OK
- Installing check_snmp_env.pl : OK
- Installing check_snmp_load.pl : OK
- Installing check_snmp_process.pl : OK
- Installing check_snmp_win.pl : OK
- Installing check_snmp_css_main.pl : OK
- Installing check_snmp_int.pl : OK
- Installing check_snmp_mem.pl : OK
- Installing check_snmp_storage.pl : OK
- Installation completed OK
- You can delete all the source files and directory
- Remember to look for informtation at http://www.manubulon.com/nagios/
- #Let's see if installation really went OK
- [root@icinga plugins]# ll /usr/lib64/nagios/manubulon-snmp
- total 348
- -rwxr-xr-x. 1 root root 12935 Jun 12 21:02 check_snmp_boostedge.pl
- -rwxr-xr-x. 1 root root 21069 Jun 12 21:02 check_snmp_cpfw.pl
- -rwxr-xr-x. 1 root root 10336 Jun 12 21:02 check_snmp_css_main.pl
- -rwxr-xr-x. 1 root root 20564 Jun 12 21:02 check_snmp_css.pl
- -rwxr-xr-x. 1 root root 43055 Jun 12 21:02 check_snmp_env.pl
- -rwxr-xr-x. 1 root root 42076 Jun 12 21:02 check_snmp_int.pl
- -rwxr-xr-x. 1 root root 11827 Jun 12 21:02 check_snmp_linkproof_nhr.pl
- -rwxr-xr-x. 1 root root 30829 Jun 12 21:02 check_snmp_load.pl
- -rwxr-xr-x. 1 root root 22134 Jun 12 21:02 check_snmp_mem.pl
- -rwxr-xr-x. 1 root root 14356 Jun 12 21:02 check_snmp_nsbox.pl
- -rwxr-xr-x. 1 root root 31274 Jun 12 21:02 check_snmp_process.pl
- -rwxr-xr-x. 1 root root 30255 Jun 12 21:02 check_snmp_storage.pl
- -rwxr-xr-x. 1 root root 17233 Jun 12 21:02 check_snmp_vrrp.pl
- -rwxr-xr-x. 1 root root 13031 Jun 12 21:02 check_snmp_win.pl
- [root@icinga plugins]# cp /usr/share/icinga2/include/command-plugins-manubulon.conf /etc/icinga2/conf.d/command-plugins-manubulon.conf
- [root@icinga plugins]# nano /etc/icinga2/constants.conf
- #Replaced the line const ManubulonPluginDir = "/usr/lib64/nagios/plugins" WITH const ManubulonPluginDir = "/usr/lib64/nagios/manubulon-snmp"
- [root@icinga plugins]# systemctl restart icinga2
- Job for icinga2.service failed because the control process exited with error code. See "systemctl status icinga2.service" and "journalctl -xe" for details.
Systemctl status output (after icinga deamon failed to start):
- [root@icinga plugins]# systemctl status icinga2.service
- ● icinga2.service - Icinga host/service/network monitoring system
- Loaded: loaded (/usr/lib/systemd/system/icinga2.service; enabled; vendor preset: disabled)
- Active: failed (Result: exit-code) since Mon 2017-06-12 21:19:16 CEST; 1min 10s ago
- Process: 16006 ExecStart=/usr/sbin/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/FAILURE)
- Process: 15939 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)
- Main PID: 2370 (code=exited, status=0/SUCCESS)
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: /etc/icinga2/conf.d/command-plugins-manubulon.conf(22): */
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: /etc/icinga2/conf.d/command-plugins-manubulon.conf(23):
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: /etc/icinga2/conf.d/command-plugins-manubulon.conf(24): template CheckCommand "snmp-manubulon-command" {
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: /etc/icinga2/conf.d/command-plugins-manubulon.conf(25): import "ipv4-or-ipv6"
- Jun 12 21:19:16 icinga.utlth-ol.si icinga2[16006]: /etc/icinga2/conf.d/command-plugins-manubulon.conf(26):
- Jun 12 21:19:16 icinga.utlth-ol.si systemd[1]: icinga2.service: control process exited, code=exited status=1
- Jun 12 21:19:16 icinga.utlth-ol.si systemd[1]: Failed to start Icinga host/service/network monitoring system.
- Jun 12 21:19:16 icinga.utlth-ol.si systemd[1]: Unit icinga2.service entered failed state.
- Jun 12 21:19:16 icinga.utlth-ol.si systemd[1]: icinga2.service failed.
- [root@icinga plugins]#
UPDATE: if I delete /etc/icinga2/conf.d/command-plugins-manubulon.conf, than icinga2 deamon starts without problem, but of course no manubulon commands are visible in Icinga2web -> Director -> Commands.