Skip to main content

Hello,

We had this issue during the upgrade from 24.10.4 to 24.10.6 : Unable to add data to connector table

You seem to be having trouble with your upgrade.
Please check the "upgrade.log" and the "sql-error.log" located in "/var/log/centreon" for more details
You may refer to the line in the specified file in order to correct the issue.
The SQL files are located in "/usr/share/centreon/www/install/sql/"
But do not edit the SQL files unless you know what you are doing.Refresh this page when the problem is fixed.

 

Here is the detail log (we replace our IP with 00.00.00.00) : 

>2025-04-08T14:41:27+02:00] ERROR : OCentreonDb] Error while executing the simple query: SQLSTATES23000]: Integrity constraint violation: 1062 Duplicate entry 'Centreon Monitoring Agent' for key 'name' | {"context":{"default":{"back_trace":{"file":"/usr/share/centreon/www/class/centreonDB.class.php","line":947,"class":null,"function":null},"request_infos":{"url":"/centreon/install/step_upgrade/process/process_step4.php","http_method":"POST","server":"00.00.00.00","referrer":"http://00.00.00.00/centreon/install/upgrade.php"}},"exception":{"exception_type":"PDOException","file":"/usr/share/centreon/www/class/centreonDB.class.php","line":342,"code":"23000","message":"SQLSTATES23000]: Integrity constraint violation: 1062 Duplicate entry 'Centreon Monitoring Agent' for key 'name'","previous":null},"custom":{"db_name":"centreon","query":"INSERT INTO `connector` (`id`, `name`, `description`, `command_line`, `enabled`, `created`, `modified`) VALUES\n(null,'Centreon Monitoring Agent', 'Centreon Monitoring Agent', 'opentelemetry --processor=centreon_agent --extractor=attributes --host_path=resource_metrics.resource.attributes.host.name --service_path=resource_metrics.resource.attributes.service.name', 1, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()),\n(null, 'Telegraf', 'Telegraf', 'opentelemetry --processor=nagios_telegraf --extractor=attributes --host_path=resource_metrics.scope_metrics.data.data_points.attributes.host --service_path=resource_metrics.scope_metrics.data.data_points.attributes.service', 1, UNIX_TIMESTAMP(), UNIX_TIMESTAMP());","pdo_error_infos":f"23000",1062,"Duplicate entry 'Centreon Monitoring Agent' for key 'name'"],"pdo_error_code":"23000"}}}

 

We had to delete this entry in the Centreon DB :

|  3 | Centreon Monitoring Agent | Centreon Monitoring Agent | opentelemetry --processor=centreon_agent --extractor=attributes --host_path=resource_metrics.resource.attributes.host.name --service_path=resource_metrics.resource.attributes.service.name |       1 | 1738074429 | 1738074429 |

 

And then restart the upgrade successfully.

Be the first to reply!

Reply