Skip to main content

 I was alerted to low diskspace on my Centreon 24.10 server and the space was mostly being used by the database. On further investigation I saw that the partitioning had stopped 23/11/2024 with the pmax being the largest.

Partitioning Properties

 

Partition name Creation time Number of entries Data size Index size Total size
pmax November 13, 2024 4:00:02 AM 209236541 8307 MB 3577.98 MB 11884.98 MB
p20241123 November 13, 2024 4:00:02 AM 2035010 81.61 MB 53.61 MB 135.22 MB
p20241122 November 13, 2024 4:00:02 AM 2104288 83.61 MB 54.64 MB 138.25 MB
p20241121 November 13, 2024 4:00:02 AM 1952270 77.61 MB 51.59 MB 129.2 MB

 

When I try to run “/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php” I receive:

>root@LINFPV003 a-fv]# su - centreon -c '/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php'
'Mon, 31 Mar 25 08:19:44 +0200] PARTITIONING STARTED
PHP Warning: file_put_contents(/var/log/centreon/sql-error.log): Failed to open stream: Permission denied in /usr/share/centreon/www/class/centreonLog.class.php on line 243
3Mon, 31 Mar 25 08:20:05 +0200] Error: cannot add a new partition 'p20241124' for table `centreon_storage`.data_bin, SQLSTATEQHY000]: General error: 2006 MySQL server has gone away

If I run the same command as root I then get

>root@LINFPV003 a-f]# /usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php
pMon, 31 Mar 25 08:39:15 +0200] PARTITIONING STARTED
DMon, 31 Mar 25 08:39:38 +0200] Error: cannot add a new partition 'p20241124' for table `centreon_storage`.data_bin, SQLSTATEQHY000]: General error: 2006 MySQL server has gone away

Seems that the MariaDB service crashes out then automatically restarts and recovers.

Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31  8:20:11 0 0Note] Plugin 'FEEDBACK' is disabled.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Rolled back recovered transaction 55220459
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Rollback of non-prepared transactions completed
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] DDL_LOG: Crash recovery executed 1 entries
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] Server socket created on IP: '0.0.0.0'.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] Server socket created on IP: '::'.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Buffer pool(s) load completed at 250331 8:20:11
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] /usr/sbin/mariadbd: ready for connections.

Any ideas how I can fix the database to get this working again? If the issue is diskspace then I can add more (16GB is free), but I haven’t needed to in the 3 years I’ve been running this server, but I will do so if it’s the only option.

Hello fvinancano_dtt

Can it be related to the version of Centreon : 

 


Hello fvinancano_dtt

Can it be related to the version of Centreon : 

 

I’m on 24.10.5 so after the mentioned update/fixes


Reply