I'm testing Nagios 4.5.1 with Thruk with livestatus.o compiled from check-mk v2.1.0p40. The module seems to load fine and is responding when reached out by Thruk, however, when it actually attempts to read the services from livestatus, Nagios process would die and get restarted. I can't seem to find any debugging information on why this is happening in both nagios.log or livestatus.log.
nagios.log
[1710197546] livestatus: setting debug level to 7
[1710197546] livestatus: Livestatus by Checkmk GmbH started with PID 1859
[1710197546] livestatus: version 2.1.0p40 compiled Mon, 11 Mar 2024 22:17:20 +0000 on 38db34bfb518
[1710197546] livestatus: built with g++-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, using C++11 regex engine
[1710197546] livestatus: please visit us at https://checkmk.com/
[1710197546] livestatus: socket path = '/opt/nagios/var/rw/live'
[1710197546] livestatus: pnp path = ''
[1710197546] livestatus: inventory path = ''
[1710197546] livestatus: structured status path = ''
[1710197546] livestatus: robotmk html log path = '""'
[1710197546] livestatus: logwatch path = ''
[1710197546] livestatus: log file path = '/opt/nagios/var/livestatus.log'
[1710197546] livestatus: mkeventd socket path = '/opt/nagios/var/rw/mkeventd/status'
[1710197546] livestatus: rrdcached socket path = '/opt/nagios/var/rw/rrdcached.sock'
[1710197546] livestatus: Hint: Please try out Checkmk (https://checkmk.com/)
[1710197546] livestatus: removed old socket file /opt/nagios/var/rw/live
[1710197546] livestatus: opened UNIX socket at /opt/nagios/var/rw/live
[1710197546] livestatus: your event_broker_options are sufficient for livestatus.
[1710197546] livestatus: finished initialization, further log messages go to /opt/nagios/var/livestatus.log
[1710197546] Event broker module '/opt/nagios/mk-livestatus/livestatus.o' initialized successfully.
[1710197546] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197546] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197546] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197546] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197546] Successfully launched command file worker with pid 1867
[1710197546] livestatus: TIMEPERIOD TRANSITION: 24x7;-1;1
[1710197546] livestatus: TIMEPERIOD TRANSITION: workhours;-1;0
[1710197546] livestatus: Timeperiod cache not updated, there are no timeperiods (yet)
[1710197546] livestatus: starting main thread and 10 client threads
[1710197546] livestatus: default stack size is 8388608
[1710197546] livestatus: setting thread stack size to 1048576
[1710197547] Nagios 4.5.1 starting... (PID=1887)
[1710197547] Local time is Mon Mar 11 22:52:27 UTC 2024
[1710197547] LOG VERSION: 2.0
[1710197547] qh: Socket '/opt/nagios/var/rw/nagios.qh' successfully initialized
[1710197547] qh: core query handler registered
[1710197547] qh: echo service query handler registered
[1710197547] qh: help for the query handler registered
[1710197547] wproc: Successfully registered manager as @wproc with query handler
[1710197547] wproc: Registry request: name=Core Worker 1889;pid=1889
[1710197547] wproc: Registry request: name=Core Worker 1890;pid=1890
[1710197547] wproc: Registry request: name=Core Worker 1891;pid=1891
[1710197547] wproc: Registry request: name=Core Worker 1893;pid=1893
[1710197547] wproc: Registry request: name=Core Worker 1892;pid=1892
[1710197547] wproc: Registry request: name=Core Worker 1894;pid=1894
[1710197547] livestatus: setting debug level to 7
[1710197547] livestatus: Livestatus by Checkmk GmbH started with PID 1887
[1710197547] livestatus: version 2.1.0p40 compiled Mon, 11 Mar 2024 22:17:20 +0000 on 38db34bfb518
[1710197547] livestatus: built with g++-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, using C++11 regex engine
[1710197547] livestatus: please visit us at https://checkmk.com/
[1710197547] livestatus: socket path = '/opt/nagios/var/rw/live'
[1710197547] livestatus: pnp path = ''
[1710197547] livestatus: inventory path = ''
[1710197547] livestatus: structured status path = ''
[1710197547] livestatus: robotmk html log path = '""'
[1710197547] livestatus: logwatch path = ''
[1710197547] livestatus: log file path = '/opt/nagios/var/livestatus.log'
[1710197547] livestatus: mkeventd socket path = '/opt/nagios/var/rw/mkeventd/status'
[1710197547] livestatus: rrdcached socket path = '/opt/nagios/var/rw/rrdcached.sock'
[1710197547] livestatus: Hint: Please try out Checkmk (https://checkmk.com/)
[1710197547] livestatus: removed old socket file /opt/nagios/var/rw/live
[1710197547] livestatus: opened UNIX socket at /opt/nagios/var/rw/live
[1710197547] livestatus: your event_broker_options are sufficient for livestatus.
[1710197547] livestatus: finished initialization, further log messages go to /opt/nagios/var/livestatus.log
[1710197547] Event broker module '/opt/nagios/mk-livestatus/livestatus.o' initialized successfully.
[1710197547] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197547] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197547] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197547] WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
[1710197547] Successfully launched command file worker with pid 1895
[1710197547] livestatus: TIMEPERIOD TRANSITION: 24x7;-1;1
[1710197547] livestatus: TIMEPERIOD TRANSITION: workhours;-1;0
[1710197547] livestatus: Timeperiod cache not updated, there are no timeperiods (yet)
[1710197547] livestatus: starting main thread and 10 client threads
[1710197547] livestatus: default stack size is 8388608
[1710197547] livestatus: setting thread stack size to 1048576
[1710197607] livestatus: Timeperiod cache not updated, there are no timeperiods (yet)
[1710197669] livestatus: Timeperiod cache not updated, there are no timeperiods (yet)
livestatus.log
2024-03-11 22:56:40 [client 10] column services.host_name is unrestricted
2024-03-11 22:56:40 [client 10] column services.groups is unrestricted
2024-03-11 22:56:40 [client 10] column services.host_groups is unrestricted
2024-03-11 22:56:40 [client 10] using full table scan
2024-03-11 22:56:40 [client 10] processed request in 0 ms, replied with 4 bytes
2024-03-11 22:56:40 [client 1] accepted client connection on fd 20
2024-03-11 22:56:40 [client 1] request: GET services\nColumns: accept_passive_checks acknowledged action_url action_url_expanded active_checks_enabled check_command check_interval check_options check_period check_type checks_enabled comments current_attempt current_notification_number description event_handler event_handler_enabled custom_variable_names custom_variable_values execution_time first_notification_delay flap_detection_enabled groups has_been_checked high_flap_threshold host_acknowledged host_action_url_expanded host_active_checks_enabled host_address host_alias host_checks_enabled host_check_type host_latency host_plugin_output host_perf_data host_current_attempt host_check_command host_comments host_groups host_has_been_checked host_icon_image_expanded host_icon_image_alt host_is_executing host_is_flapping host_name host_notes_url_expanded host_notifications_enabled host_scheduled_downtime_depth host_state host_accept_passive_checks host_last_state_change icon_image icon_image_alt icon_image_expanded is_executing is_flapping last_check last_notification last_state_change latency low_flap_threshold max_check_attempts next_check notes notes_expanded notes_url notes_url_expanded notification_interval notification_period notifications_enabled obsess_over_service percent_state_change perf_data plugin_output process_performance_data retry_interval scheduled_downtime_depth state state_type modified_attributes_list last_time_critical last_time_ok last_time_unknown last_time_warning display_name host_display_name host_custom_variable_names host_custom_variable_values in_check_period in_notification_period host_parents long_plugin_output\nFilter: host_scheduled_downtime_depth = 0\nFilter: host_acknowledged = 0\nAnd: 2\nFilter: has_been_checked = 1\nFilter: state = 1\nAnd: 2\nFilter: has_been_checked = 1\nFilter: state = 3\nAnd: 2\nFilter: has_been_checked = 1\nFilter: state = 2\nAnd: 2\nOr: 3\nFilter: scheduled_downtime_depth = 0\nFilter: acknowledged = 0\nFilter: checks_enabled = 1\nAnd: 3\nAnd: 3\nLimit: 100\nOutputFormat: json\nResponseHeader: fixed16
2024-03-11 22:56:40 [client 1] column services.host_name is unrestricted
2024-03-11 22:56:40 [client 1] column services.groups is unrestricted
2024-03-11 22:56:40 [client 1] column services.host_groups is unrestricted
2024-03-11 22:56:40 [client 1] using full table scan
2024-03-11 22:56:40 [client 1] processed request in 0 ms, replied with 1 bytes
2024-03-11 22:56:42 [main] Polling failed: Connection timed out
2024-03-11 22:56:45 [main] Polling failed: Connection timed out
2024-03-11 22:56:47 [main] Polling failed: Connection timed out
nagios.cfg
...
broker_module=/opt/nagios/mk-livestatus/livestatus.o /opt/nagios/var/rw/live debug=7
...
xinetd: livestatus
service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no
cps = 100 3
instances = 500
per_source = 250
flags = NODELAY
user = nagios
server = /usr/local/bin/unixcat
server_args = /opt/nagios/var/rw/live
disable = no
}
Thruk should return with checks and status from Nagios instance with livestatus.o loaded.