New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #11962] Overflow in current_notification_number column in DB IDO MySQL #4293
Comments
Updated by mfriedrich on 2016-06-17 06:28:30 +00:00
Can you please extract the query which contains 'current_notification_number'? |
Updated by vvv on 2016-06-17 19:05:23 +00:00 icinga2 - The Icinga 2 network monitoring daemon (version: v2.4.10) Copyright © 2012-2016 Icinga Development Team (https://www.icinga.org/) Application information: System information: [2016-06-17 19:01:02 +0000] critical/IdoMysqlConnection: Error "Out of range value for column 'current_notification_number' at row 1" when executing query "INSERT INTO icinga_customvariables (config_type, instance_id, is_json, object_id, session_token, varname, varvalue) VALUES ('1', 1, '0', 2653, 1466190057, 'nrpe_arguments', '/opt');INSERT INTO icinga_customvariables (config_type, instance_id, is_json, object_id, session_token, varname, varvalue) VALUES ('1', 1, '0', 2653, 1466190057, 'nrpe_command', 'check_disk_arg');INSERT INTO icinga_customvariablestatus (instance_id, is_json, object_id, session_token, status_update_time, varname, varvalue) VALUES (1, '0', 2653, 1466190057, FROM_UNIXTIME(1466190062), 'nrpe_arguments', '/opt');INSERT INTO icinga_customvariablestatus (instance_id, is_json, object_id, session_token, status_update_time, varname, varvalue) VALUES (1, '0', 2653, 1466190057, FROM_UNIXTIME(1466190062), 'nrpe_command', 'check_disk_arg');INSERT INTO icinga_services (action_url, active_checks_enabled, check_command_args, check_command_object_id, check_interval, config_type, display_name, event_handler_enabled, flap_detection_enabled, freshness_checks_enabled, freshness_threshold, high_flap_threshold, host_object_id, icon_image, icon_image_alt, instance_id, is_volatile, low_flap_threshold, max_check_attempts, notes, notes_url, notification_interval, notifications_enabled, notify_on_critical, notify_on_downtime, notify_on_flapping, notify_on_recovery, notify_on_unknown, notify_on_warning, passive_checks_enabled, process_performance_data, retry_interval, service_object_id, stalk_on_critical, stalk_on_ok, stalk_on_unknown, stalk_on_warning) VALUES ('', '1', '', 2491, '5', '1', 'check_disk_opt', '1', '0', '1', '300', '30', 2538, '', '', 1, '0', '30', '3', '', '', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', 2653, '0', '0', '0', '0');INSERT INTO icinga_servicestatus (acknowledgement_type, active_checks_enabled, check_command, check_source, check_type, current_check_attempt, current_notification_number, current_state, endpoint_object_id, event_handler, event_handler_enabled, execution_time, flap_detection_enabled, has_been_checked, instance_id, is_flapping, is_reachable, last_check, last_hard_state, last_hard_state_change, last_notification, last_state_change, last_time_critical, last_time_ok, last_time_warning, latency, long_output, max_check_attempts, next_check, next_notification, normal_check_interval, notifications_enabled, original_attributes, output, passive_checks_enabled, percent_state_change, perfdata, problem_has_been_acknowledged, process_performance_data, retry_check_interval, scheduled_downtime_depth, service_object_id, should_be_scheduled, state_type, status_update_time) VALUES ('0', '1', 'nrpe', 'icingatest', '0', '1', '42290', '2', 2461, '', '1', '0.016252040863037109', '0', '1', 1, '0', '1', FROM_UNIXTIME(1466115385), '2', FROM_UNIXTIME(1465812067), FROM_UNIXTIME(1466190057), FROM_UNIXTIME(1465812067), FROM_UNIXTIME(1466115385), FROM_UNIXTIME(1464738637), FROM_UNIXTIME(1465811859), '0.00064992904663085938', '', '3', FROM_UNIXTIME(1466190188), FROM_UNIXTIME(1466190117), '5', '1', 'null', 'DISK CRITICAL - free space: /opt 411 MB (4% inode=96%):', '1', '0', '/opt=9296MB;9210;9722;0;10234', '0', '1', '1', '0', 2653, '1', '1', FROM_UNIXTIME(1466190062));UPDATE icinga_customvariables SET config_type = '1', instance_id = 1, is_json = '0', object_id = 2654, session_token = 1466190057, varname = 'nrpe_command', varvalue = 'check_procs_chef' WHERE object_id = 2654 AND varname = 'nrpe_command';UPDATE icinga_customvariablestatus SET instance_id = 1, is_json = '0', object_id = 2654, session_token = 1466190057, status_update_time = FROM_UNIXTIME(1466190062), varname = 'nrpe_command', varvalue = 'check_procs_chef' WHERE object_id = 2654 AND varname = 'nrpe_command';UPDATE icinga_services SET action_url = '', active_checks_enabled = '1', check_command_args = '', check_command_object_id = 2491, check_interval = '5', config_type = '1', display_name = 'check_chef_proc', event_handler_enabled = '1', flap_detection_enabled = '0', freshness_checks_enabled = '1', freshness_threshold = '300', high_flap_threshold = '30', host_object_id = 2537, icon_image = '', icon_image_alt = '', instance_id = 1, is_volatile = '0', low_flap_threshold = '30', max_check_attempts = '3', notes = '', notes_url = '', notification_interval = '1', notifications_enabled = '1', notify_on_critical = '1', notify_on_downtime = '1', notify_on_flapping = '1', notify_on_recovery = '1', notify_on_unknown = '1', notify_on_warning = '1', passive_checks_enabled = '1', process_performance_data = '1', retry_interval = '1', service_object_id = 2654, stalk_on_critical = '0', stalk_on_ok = '0', stalk_on_unknown = '0', stalk_on_warning = '0' WHERE service_object_id = 2654;UPDATE icinga_servicestatus SET acknowledgement_type = '0', active_checks_enabled = '1', check_command = 'nrpe', check_source = 'icingatest', check_type = '0', current_check_attempt = '1', current_notification_number = '0', current_state = '0', endpoint_object_id = 2461, event_handler = '', event_handler_enabled = '1', execution_time = '0.021357059478759766', flap_detection_enabled = '0', has_been_checked = '1', instance_id = 1, is_flapping = '0', is_reachable = '1', last_check = FROM_UNIXTIME(1466115435), last_hard_state = '0', last_hard_state_change = FROM_UNIXTIME(1464984098), last_state_change = FROM_UNIXTIME(1464984038), last_time_critical = FROM_UNIXTIME(1464983796), last_time_ok = FROM_UNIXTIME(1466115435), latency = '0.00081801414489746094', long_output = '', max_check_attempts = '3', next_check = FROM_UNIXTIME(1466190327), next_notification = FROM_UNIXTIME(1466190117), normal_check_interval = '5', notifications_enabled = '1', original_attributes = 'null', output = 'PROCS OK: 1 process with args \'/var/run/chef/client.pid\'', passive_checks_enabled = '1', percent_state_change = '0', perfdata = '', problem_has_been_acknowledged = '0', process_performance_data = '1', retry_check_interval = '1', scheduled_downtime_depth = '0', service_object_id = 2654, should_be_scheduled = '1', state_type = '1', status_update_time = FROM_UNIXTIME(1466190062) WHERE service_object_id = 2654" Not sure if that's all you need. Please let me know if you need anything more. |
Updated by gbeutner on 2016-06-22 07:28:03 +00:00
|
Updated by mfriedrich on 2016-06-22 10:13:30 +00:00
Try these ALTER statements. The schema changes will be applied in 2.5.0 as well.
PostgreSQL is not affected, the column type already is INTEGER. |
Updated by mfriedrich on 2016-06-22 10:15:03 +00:00
Applied in changeset 067cb8d. |
Updated by vvv on 2016-06-23 23:30:01 +00:00 I'm getting these errors with the alter table command. mysql> ALTER TABLE icinga_hoststatus MODIFY COLUMN current_notification_number int unsigned default 0; |
Updated by mfriedrich on 2016-06-24 07:28:29 +00:00 Strange. That looks like another error not necessarily related to the ALTER statements. Which MySQL version are you using?
And please show create table output for both icinga_hoststatus and icinga_servicestatus tables.
|
Updated by vvv on 2016-06-28 18:22:45 +00:00 [root@dc5-icinga1-1-np ~]# mysql --version [root@dc5-icinga1-1-np ~]# mysql -u icinga -p icinga -e 'show create table icinga_hoststatus\G' * 1. row* * 1. row* |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11962
Created by vvv on 2016-06-16 22:28:06 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2016-06-22 10:15:03 +00:00)
Target Version: 2.5.0
Last Update: 2016-06-28 18:22:45 +00:00 (in Redmine)
I just upgraded to 2.4.10 and I'm having connection issues to the database and this error
[2016-06-16 22:17:04 +0000] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!
[2016-06-16 22:17:04 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 1 (schema version: '1.14.0')
[2016-06-16 22:17:08 +0000] critical/IdoMysqlConnection: Error "Out of range value for column 'current_notification_number' at row 1" when executing query "INSERT INTO icinga_customvariables (config_type, instance_id, is_json, object_id, session_token, varname, varvalue) VALUES ('1', 1, '0', 1355, 1466115424, 'nrpe_arguments', '/opt');INSERT INTO icinga_customvariables (config_type, instance_id, is_json, object_id, session_token, varname, varvalue)
I can query the database manually.
Changesets
2016-06-22 10:13:49 +00:00 by mfriedrich 067cb8d
The text was updated successfully, but these errors were encountered: