You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
We've encountered a SQL exception when LibreNMS attempts to update the availability_perc column in the availability table. The error indicates that the value being updated (-3247.42) is out of range for the column. This issue prevents the successful update of availability percentages in certain cases, leading to potential inaccuracies in availability tracking and reporting.
Error:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update availability set availability_perc = -3247.42 where availability_id = 332)
Potential Cause:
The error suggests that the data type or precision and scale of the availability_perc column does not support the range of values being inserted or updated, especially negative values or values with high precision.
Suggested Action:
It may be necessary to review and possibly adjust the data type, precision, and scale of the availability_perc column in the database schema to accommodate a wider range of values. Additionally, examining the logic that generates these values to ensure they are within expected bounds might be beneficial.
Output of ./validate.php
bash-4.4$ cd /opt/librenms/
bash-4.4$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS | 24.2.0-20-gd7c31e0ae (2024-03-07T19:27:26+01:00)
DB Schema | 2024_02_07_151845_custom_map_additions (290)
PHP | 8.2.7
Python | 3.6.8
Database | MariaDB 10.3.39-MariaDB
RRDTool | 1.7.0
SNMP | 5.8
===========================================
[OK] Composer Version: 2.7.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
What was the last working version of LibreNMS?
24.2.0-20-gd7c31e0ae
Anything in the logs that might be useful for us?
#31 {main}
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update `availability` set `availability_perc` = -3247.42 where `availability_id` = 332) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update `availability` set `availability_perc` = -3247.42 where `availability_id` = 332) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
[previous exception] [object] (PDOException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:612)"}
The text was updated successfully, but these errors were encountered:
The problem
Description:
We've encountered a SQL exception when LibreNMS attempts to update the availability_perc column in the availability table. The error indicates that the value being updated (-3247.42) is out of range for the column. This issue prevents the successful update of availability percentages in certain cases, leading to potential inaccuracies in availability tracking and reporting.
Error:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update
availability
setavailability_perc
= -3247.42 whereavailability_id
= 332)Potential Cause:
The error suggests that the data type or precision and scale of the availability_perc column does not support the range of values being inserted or updated, especially negative values or values with high precision.
Suggested Action:
It may be necessary to review and possibly adjust the data type, precision, and scale of the availability_perc column in the database schema to accommodate a wider range of values. Additionally, examining the logic that generates these values to ensure they are within expected bounds might be beneficial.
Output of ./validate.php
What was the last working version of LibreNMS?
24.2.0-20-gd7c31e0ae
Anything in the logs that might be useful for us?
#31 {main} SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update `availability` set `availability_perc` = -3247.42 where `availability_id` = 332) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 (Connection: mysql, SQL: update `availability` set `availability_perc` = -3247.42 where `availability_id` = 332) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829) [previous exception] [object] (PDOException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'availability_perc' at row 1 at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:612)"}
The text was updated successfully, but these errors were encountered: