check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by kaushalshriyan »

Hi,

I am currently running the below versions

Code: Select all

[root@ip-172-31-28-98 centos]# rpm -qa | grep check-mk
check-mk-agent-1.4.0p31-2.el7.x86_64
check-mk-1.4.0p31-2.el7.x86_64
check-mk-livestatus-1.4.0p31-2.el7.x86_64
[root@ip-172-31-28-98 centos]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@ip-172-31-28-98 centos]#
[root@ip-172-31-28-98 etc]# cd /usr/local/nagios/etc/
[root@ip-172-31-28-98 etc]# cat nagios.cfg | grep live
broker_module=/usr/lib64/check_mk/livestatus.o /usr/local/nagios/var/live.sock
[root@ip-172-31-28-98 etc]# ll /usr/lib64/check_mk/livestatus.o
-rwxr-xr-x. 1 root root 2806352 Jun  1  2018 /usr/lib64/check_mk/livestatus.o
[root@ip-172-31-28-98 etc]# rpm -qil check-mk-livestatus-1.4.0p31-2.el7.x86_64
Name        : check-mk-livestatus
Version     : 1.4.0p31
Release     : 2.el7
Architecture: x86_64
Install Date: Sun 01 Jul 2018 05:19:05 AM UTC
Group       : Applications/Internet
Size        : 3719095
License     : GPLv2 and GPLv3
Signature   : RSA/SHA256, Fri 01 Jun 2018 02:03:29 PM UTC, Key ID 6a2faea2352c64e5
Source RPM  : check-mk-1.4.0p31-2.el7.src.rpm
Build Date  : Fri 01 Jun 2018 01:41:06 PM UTC
Build Host  : buildvm-18.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://mathias-kettner.de/check_mk
Bug URL     : https://bugz.fedoraproject.org/check-mk
Summary     : The check-mk's Livestatus
Description :
This package contains livestatus, the check-mk's plugin for
accessing the relevant Nagios files being responsible of
listing the hosts and services status.
/usr/bin/unixcat
/usr/lib64/check_mk
/usr/lib64/check_mk/livestatus.o
/usr/share/doc/check-mk-livestatus-1.4.0p31
/usr/share/doc/check-mk-livestatus-1.4.0p31/COPYING
[root@ip-172-31-28-98 etc]# ll /usr/lib64/check_mk
total 2744
-rwxr-xr-x. 1 root root 2806352 Jun  1  2018 livestatus.o
[root@ip-172-31-28-98 etc]#
I am referring to
https://mathias-kettner.com/download_ve ... dition=cre

and i have downloaded the rpm file.
https://mathias-kettner.de/support/1.5. ... x86_64.rpm


I am following the below steps

Code: Select all

#rpm -ivh check-mk-raw-1.5.0p12-el7-38.x86_64.rpm
#cp /opt/omd/versions/1.5.0p12.cre/lib/mk-livestatus/livestatus.o /usr/lib64/check_mk/livestatus.o 
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
#service nagios restart
Please comment and correct me if i am missing anything.

Best Regards,

Kaushal
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by kaushalshriyan »

Hi,

I am trying to upgrade the underlying broker_module livestatus.o object file which i got it installed from 1.4.0p31-2.el7.x86_64. I am trying to upgrade it to 1.5.0p12-el7-38.x86_64. I am using it for Nagios Core 4.4.3 in my setup.

Code: Select all

#cp /opt/omd/versions/1.5.0p12.cre/lib/mk-livestatus/livestatus.o /usr/lib64/check_mk/livestatus.o
[1552120195] Error: Could not load module '/usr/lib64/check_mk/livestatus.o' -> /usr/lib64/check_mk/livestatus.o: undefined symbol: last_command_check
[1552120195] Error: Failed to load module '/usr/lib64/check_mk/livestatus.o'.
[1552120195] Error: Module loading failed. Aborting.
I have rolled it back to the previous working state and it is working fine. The details of nagios.log are as below :-

[1552120319] livestatus: Livestatus 1.4.0p31 by Mathias Kettner. Socket: '/usr/local/nagios/var/live.sock'
[1552120319] livestatus: Please visit us at http://mathias-kettner.de/
[1552120319] livestatus: Hint: Please try out OMD - the Open Monitoring Distribution
[1552120319] livestatus: Please visit OMD at http://omdistro.org
[1552120319] livestatus: removed old socket file /usr/local/nagios/var/live.sock
[1552120319] livestatus: opened UNIX socket at /usr/local/nagios/var/live.sock
[1552120319] livestatus: your event_broker_options are sufficient for livestatus..
[1552120319] livestatus: environment_macros are enabled, this might decrease the overall nagios performance
[1552120319] livestatus: finished initialization, further log messages go to /usr/local/nagios/var/livestatus.log
[1552120319] Event broker module '/usr/lib64/check_mk/livestatus.o' initialized successfully.
[1552120319] Successfully launched command file worker with pid 7949
[1552120319] livestatus: TIMEPERIOD TRANSITION: 24x7;-1;1
[1552120319] livestatus: TIMEPERIOD TRANSITION: 24x7_sans_holidays;-1;1
[1552120319] livestatus: TIMEPERIOD TRANSITION: none;-1;0
[1552120319] livestatus: TIMEPERIOD TRANSITION: us-holidays;-1;0
[1552120319] livestatus: TIMEPERIOD TRANSITION: workhours;-1;0
[1552120319] livestatus: starting main thread and 10 client threads
[1552120319] livestatus: default stack size is 8388608
[1552120319] livestatus: setting thread stack size to 1048576


# ll /var/tmp/livestatus.o -h
-rwxr-xr-x. 1 root root 75M Mar 9 08:29 /var/tmp/livestatus.o ( 1.5.0p12-el7-38.x86_64)

# ll /root/livestatus.o -h
-rwxr-xr-x. 1 root root 2.7M Mar 9 08:29 /root/livestatus.o (1.4.0p31-2.el7.x86_64)
#

Any clue regarding the above error? Thanks in Advance.

Best Regards,

Kaushal
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by npolovenko »

You need to recompile livestatus for nagios 4. Please uninstall the old module and follow this instruction:
wget https://mathias-kettner.de/support/1.5. ... 0p9.tar.gz
tar xzf mk-livestatus-1.5.0p9.tar.gz
cd mk-livestatus-1.5.0p9
./configure --with-nagios4

You'll see this error:
error: *** A compiler with support for C++17 language features is required.
Run these commands:
1. yum install centos-release-scl
2. yum install devtoolset-7-gcc-c++
3. yum install rrdtool-devel
(if you get some error with GPG keys please install the nagios repo for Cent7 from here) https://repo.nagios.com/?repo=rpm-cento ... 1496153015
4. yum install boost*
5. scl enable devtoolset-7 bash
6. ./configure --with-nagios4


cd src
make install
Create broker_module line in nagios.cfg and restart nagios
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live
service nagios restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by kaushalshriyan »

Hi Nikita Polovenko,

Thanks a lot and it worked like a charm. By the by I have downloaded https://mathias-kettner.de/support/1.5. ... p12.tar.gz

Code: Select all

[1552417148] livestatus: fl_socket_path=[/usr/local/nagios/var/rw/live], fl_mkeventd_socket_path=[/usr/local/nagios/var/rw/mkeventd/status]
[1552417148] livestatus: Livestatus by Mathias Kettner started with PID 4182
[1552417148] livestatus: version 1.5.0p12 compiled Tue, 12 Mar 2019 18:51:40 +0000 on ip-172-31-28-98.ap-south-1.compute.internal
[1552417148] livestatus: built with g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5), using C++11 regex engine
[1552417148] livestatus: Using socket at '/usr/local/nagios/var/rw/live'
[1552417148] livestatus: Please visit us at http://mathias-kettner.de/
[1552417148] livestatus: Hint: Please try out OMD - the Open Monitoring Distribution
[1552417148] livestatus: Please visit OMD at http://omdistro.org
[1552417148] livestatus: opened UNIX socket at /usr/local/nagios/var/rw/live
[1552417148] livestatus: your event_broker_options are sufficient for livestatus..
[1552417148] livestatus: environment_macros are enabled, this might decrease the overall nagios performance
[1552417148] livestatus: finished initialization, further log messages go to /usr/local/nagios/var/livestatus.log
[1552417148] Event broker module '/usr/local/lib/mk-livestatus/livestatus.o' initialized successfully.
[1552417148] Successfully launched command file worker with pid 4189
[1552417148] livestatus: TIMEPERIOD TRANSITION: 24x7;-1;1
[1552417148] livestatus: TIMEPERIOD TRANSITION: 24x7_sans_holidays;-1;1
[1552417148] livestatus: TIMEPERIOD TRANSITION: none;-1;0
[1552417148] livestatus: TIMEPERIOD TRANSITION: us-holidays;-1;0
[1552417148] livestatus: TIMEPERIOD TRANSITION: workhours;-1;0
[1552417148] livestatus: Timeperiod cache not updated, there are no timeperiods (yet)
[1552417148] livestatus: starting main thread and 10 client threads
[1552417148] livestatus: default stack size is 8388608
[1552417148] livestatus: setting thread stack size to 1048576
Screenshot 2019-03-13 at 12.34.58 AM.png
Also when i try to hit https://mathias-kettner.de/support/ it prompts me for username password and says
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Please comment.

Best Regards,

Kaushal
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by npolovenko »

@kaushalshriyan, Glad this worked for you!

Sorry, where did you get this URL?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by kaushalshriyan »

Hi Nikita Polovenko,

I wanted to list the latest mk-livestatus software version using https://mathias-kettner.de/support/ and it prompted me to provide username and password. I have attached the screenshot for your reference.
Screenshot 2019-03-13 at 7.03.33 AM.png
For example the complete URL :- https://mathias-kettner.de/support/1.5.0p12/mk-livestatus-1.5.0p12.tar.gz

Please comment and i look forward to hearing from you.

Best Regards,

Kaushal
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check-mk-raw-1.5.0p12 on CentOS Linux release 7.6.1810

Post by npolovenko »

@kaushalshriyan, Check_MK is a third party software and looks like this is the link to their support portal? We don't have any access to that.
From what I've read their community edition is free but the support is paid. More can be found here:
https://mathias-kettner.com/support.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked