Announcement

Collapse

New forum rules

The forum get new posts rules.

A new user will be moderate for new post. After five valid posts, the user will be to have right to post without moderation.

If you have some issue to post or to connect, contact us.
See more
See less

Centreon-central Partitioning Critical

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Centreon-central Partitioning Critical

    After install Centreon from VM, I have this error on Centreon-central:

    CRITICAL: Partitions for table 'centreon_storage.logs' are not up to date (current retention forward in days: 0) - Partitions for table 'centreon_storage.log_archive_service' are not up to date (current retention forward in days: 0) - Partitions for table 'centreon_storage.log_archive_host' are not up to date (current retention forward in days: 0)

    I find nothing for this error...

  • #2
    hi dude,

    Did u have new information from you're problem, because i have the same.

    Comment


    • #3

      php /usr/share/centreon/cron/centreon-partitioning.php -m /usr/share/centreon/config/partition.d/partitioning-log_archive_host.xml Exec this command and for me it's work.

      Comment


      • #4
        Originally posted by pierrenavarrete View Post
        php /usr/share/centreon/cron/centreon-partitioning.php -m /usr/share/centreon/config/partition.d/partitioning-log_archive_host.xml Exec this command and for me it's work.
        Pierre, thanks for tip. I try to install centreon VM 18.10, and faced the same situation. But unfortunately, PHP commands fails with following error:

        PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /usr/share/centreon/www/class/centreonDB.class.php on line 102

        This seems to be due to php version 5.4.16 embedded in VM that does not support yet class definition. So all partition PHP scripts fails.

        Anyone or you can advice how to update php to version 5.5 at least that can handle it correctly ?

        Comment


        • #5
          Bonjour, Je rencontre le même problème que vous, je vous tiens au courant si je trouve une solution.

          Comment


          • #6
            Hi Mates,

            I managed to run the script /usr/share/centreon/cron/centreon-partitioning.php by applying the following patch :
            • In file /usr/share/centreon/www/class/centreonDBStatement.class.php : add the static function create() in class CentreonDBStatement
            [...]
            protected function __construct($dbh, CentreonLog $log = null, $debug = null)
            {
            $this->dbh = $dbh;
            $this->log = $log;
            $this->debug = $debug ? true : false;
            $this->fetchAll = null;
            }

            public static function create()
            {
            return new static(null);
            }

            [...]
            • In file /usr/share/centreon/www/class/centreonDBStatement.class.php : replace CentreonDBStatement::class occurrence by get_class() as follows
            [...]
            $statement = CentreonDBStatement::create();
            $this->options = array(
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_STATEMENT_CLASS => [
            get_class($statement),
            [$this, $this->log, $this->debug],
            ],
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
            );

            [...]

            It should fix the issue with PHP 5.4. Do not forget to backup the original files because this is a temporary fix.

            Now you can safely run the command :

            $> php /usr/share/centreon/cron/centreon-partitioning.php -m /usr/share/centreon/config/partition.d/partitioning-log_archive_host.xml

            PARTITIONING STARTED
            [...]
            PARTITIONING COMPLETED


            Comment


            • #7
              I finished configuring a vm with Centreon 18.10 and I have the same problem, did someone solve it? Thanks.

              Comment

              Working...
              X