Hello
We have found the following errors in the log file /usr/local/nagios/var/nagios.log and in several files within the directory: /usr/local/nagios/var/archives/
the complete error sequence would be:
[1736335060] NDO-3: Errno was 167; message was Out of range value for column 'servicecheck_id' at row 1
[1736335060] NDO-3: The following query failed while MySQL appears to be connected:
[1736335060] NDO-3: INSERT INTO nagios_servicechecks (instance_id, start_time, start_time_usec, end_time, end_time_usec, service_object_id, check_type, current_check_attempt, max_check_attempts, state, state_type, timeout, early_timeout, execution_time, latency, return_code, output, long_output, perfdata, command_object_id, command_args, command_line) VALUES (1,FROM_UNIXTIME(1736335058),347941,FROM_UNIXTIME(1736335060),93768,15541,0,1,5,0,1,60,0,1.745827,0.000273,0,'CHECK_NRPE: Invalid packet version received from server.','OK: Application Pool Started \"wcfdiferenciask2pro.dkvseguros.es\"','',0,'','') ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), start_time = VALUES(start_time), start_time_usec = VALUES(start_time_usec), end_time = VALUES(end_time), end_time_usec = VALUES(end_time_usec), service_object_id = VALUES(service_object_id), check_type = VALUES(check_type), current_check_attempt = VALUES(current_check_attempt), max_check_attempts = VALUES(max_check_attempts), state = VALUES(state), state_type = VALUES(state_type), timeout = VALUES(timeout), early_timeout = VALUES(early_timeout), execution_time = VALUES(execution_time), latency = VALUES(latency), return_code = VALUES(return_code), output = VALUES(output), long_output = VALUES(long_output), perfdata = VALUES(perfdata), command_object_id = VALUES(command_object_id), command_args = VALUES(command_args), command_line = VALUES(command_line)
the error occurs very frequently, causing some files within the /usr/local/nagios/var/archives/ directory to occupy several gigabytes.
we have applied this note: https://answerhub.nagios.com/support/s/ ... n-3a012c2e but it has not solved the problem.
Version: Nagios XI 2024R1.2.1
OS: Red Hat Enterprise Linux release 8.9 (Ootpa)
Regards.
Errno was 167; message was Out of range value for column
-
dkvseguros
- Posts: 2
- Joined: Mon Jan 15, 2018 4:02 am
Re: Errno was 167; message was Out of range value for column
If that didn't work then it might take a bit of work and troubleshooting to fix the issue. Have you attempted to run any of the db repair scripts? It may not work but it could be worth a shot, make sure to take a snapshot before running them. I'll add docs for running the script incase you want to try it. Otherwise since this seems like it will take a bit of trouble shooting it may be best to open a support ticket with us here.dkvseguros wrote: ↑Wed Jan 08, 2025 6:25 am Hello
We have found the following errors in the log file /usr/local/nagios/var/nagios.log and in several files within the directory: /usr/local/nagios/var/archives/
the complete error sequence would be:
[1736335060] NDO-3: Errno was 167; message was Out of range value for column 'servicecheck_id' at row 1
[1736335060] NDO-3: The following query failed while MySQL appears to be connected:
[1736335060] NDO-3: INSERT INTO nagios_servicechecks (instance_id, start_time, start_time_usec, end_time, end_time_usec, service_object_id, check_type, current_check_attempt, max_check_attempts, state, state_type, timeout, early_timeout, execution_time, latency, return_code, output, long_output, perfdata, command_object_id, command_args, command_line) VALUES (1,FROM_UNIXTIME(1736335058),347941,FROM_UNIXTIME(1736335060),93768,15541,0,1,5,0,1,60,0,1.745827,0.000273,0,'CHECK_NRPE: Invalid packet version received from server.','OK: Application Pool Started \"wcfdiferenciask2pro.dkvseguros.es\"','',0,'','') ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), start_time = VALUES(start_time), start_time_usec = VALUES(start_time_usec), end_time = VALUES(end_time), end_time_usec = VALUES(end_time_usec), service_object_id = VALUES(service_object_id), check_type = VALUES(check_type), current_check_attempt = VALUES(current_check_attempt), max_check_attempts = VALUES(max_check_attempts), state = VALUES(state), state_type = VALUES(state_type), timeout = VALUES(timeout), early_timeout = VALUES(early_timeout), execution_time = VALUES(execution_time), latency = VALUES(latency), return_code = VALUES(return_code), output = VALUES(output), long_output = VALUES(long_output), perfdata = VALUES(perfdata), command_object_id = VALUES(command_object_id), command_args = VALUES(command_args), command_line = VALUES(command_line)
the error occurs very frequently, causing some files within the /usr/local/nagios/var/archives/ directory to occupy several gigabytes.
we have applied this note: https://answerhub.nagios.com/support/s/ ... n-3a012c2e but it has not solved the problem.
Version: Nagios XI 2024R1.2.1
OS: Red Hat Enterprise Linux release 8.9 (Ootpa)
Regards.
https://assets.nagios.com/downloads/nag ... tabase.pdf
Re: Errno was 167; message was Out of range value for column
Hi @dkvseguros,
The issue here is that the table is effectively full. The id column mentioned in the error is auto incremented whenever a value is added to the table, and is a signed integer, so if the value is out of range that means you have gone over 2147483647 total records in the table.
The ideal next step here would be to truncate the table and update your configuration to prevent it from being updated in the future.The use of this table is deprecated at this point, and truncating it will NOT affect your historical reports or your ongoing monitoring.
The simplest way to accomplish this would be to run the repair_crashed_databases script, located here:
The issue here is that the table is effectively full. The id column mentioned in the error is auto incremented whenever a value is added to the table, and is a signed integer, so if the value is out of range that means you have gone over 2147483647 total records in the table.
The ideal next step here would be to truncate the table and update your configuration to prevent it from being updated in the future.The use of this table is deprecated at this point, and truncating it will NOT affect your historical reports or your ongoing monitoring.
The simplest way to accomplish this would be to run the repair_crashed_databases script, located here:
Code: Select all
/usr/local/nagiosxi/scripts/repair_crashed_databases.sh-
dkvseguros
- Posts: 2
- Joined: Mon Jan 15, 2018 4:02 am
Re: Errno was 167; message was Out of range value for column
Hi jsimon
Thank you for your suggestion.
Regards.
We have run the script to repair the database, but it has had no effect. The log continues to report the same error repeatedly.The simplest way to accomplish this would be to run the repair_crashed_databases script, located here:
Code: Select all
/usr/local/nagiosxi/scripts/repair_crashed_databases.sh
Thank you for your suggestion.
Regards.
Re: Errno was 167; message was Out of range value for column
If the repair scripts didnt fix the issue then it may be best to open a support ticket since this will likely take some troubleshooting and looking through logs to find the issue. You can open a support ticket here.dkvseguros wrote: ↑Thu Jan 09, 2025 4:58 am Hi jsimonWe have run the script to repair the database, but it has had no effect. The log continues to report the same error repeatedly.The simplest way to accomplish this would be to run the repair_crashed_databases script, located here:
Code: Select all
/usr/local/nagiosxi/scripts/repair_crashed_databases.sh
Thank you for your suggestion.
Regards.
Re: Errno was 167; message was Out of range value for column
This issue indicates that the servicecheck_id column in the nagios_servicechecks table is trying to store a value that exceeds its allowed range. This often happens due to limitations in the data type of the column, combined with the growth of the database over time. Stickman Hook
-
JimVickers
- Posts: 4
- Joined: Sat Apr 05, 2025 6:43 am
Re: Errno was 167; message was Out of range value for column
In many cases like this, converting the servicecheck_id column (and possibly others) from INT to BIGINT in the NDOUtils database helps resolve the issue. This expands the range and prevents the “Out of range value” errors once the record count exceeds the 32-bit limit.
ulyagames
ulyagames