Skip to main content
Solved

Backup up issue 24.04.01


Forum|alt.badge.img+3

/etc/centreon/conf.pm did not return a true value at /usr/share/centreon/cron/centreon-backup.pl line 63.
 

the file cat /etc/centreon/conf.pm is empty

Best answer by Laurent

Oups sorry I made a mistake:

#############################################
# File Added by Centreon
#

$centreon_config = {
       VarLib => "/var/lib/centreon",
       CentreonDir => "/usr/share/centreon/",
       CacheDir => "/var/cache/centreon",
       "centreon_db" => "centreon",
       "centstorage_db" => "centreon_storage",
       "db_host" => "localhost:3306",
       "db_user" => "CENTREON_DB_USERNAME",
       "db_passwd" => 'CENTREON_DB_PASSWORD'
};

# Central, Remote or Poller ?
$instance_mode = "central";

# Centreon Centcore Command File
$cmdFile = "/var/lib/centreon/centcore.cmd";

# Deprecated format of Config file.
$mysql_user = "CENTREON_DB_USERNAME";
$mysql_passwd = 'CENTREON_DB_PASSWORD';
$mysql_host = "localhost:3306";
$mysql_database_oreon = "centreon";
$mysql_database_ods = "centreon_storage";

 

View original
Did this topic help you find an answer to your question?

7 replies

Laurent
Centreonian
Forum|alt.badge.img+20
  • Centreonian
  • 965 replies
  • May 21, 2024

Hi @Christian JUILLARD this file is empty on your Centreon central server?


Forum|alt.badge.img+3

yes file is empty on Centreon central serve


Laurent
Centreonian
Forum|alt.badge.img+20
  • Centreonian
  • 965 replies
  • May 22, 2024

Hi,

It shouldn’t be! Can you create it from with template:

#############################################
# File Added by Centreon
#

$centreon_config = {
       VarLib => "/var/lib/centreon",
       CentreonDir => "/usr/share/centreon/",
       CacheDir => "/var/cache/centreon",
       "centreon_db" => "centreon",
       "centstorage_db" => "centreon_storage",
       "db_host" => "localhost:3306",
       "db_user" => "CENTREON_DB_USERNAME",
       "db_passwd" => 'CENTREON_DB_PASSWORD'
};

# Central, Remote or Poller ?
$instance_mode = "central";

# Centreon Centcore Command File
$cmdFile = "/var/lib/centreon/centcore.cmd";

# Deprecated format of Config file.
$mysql_user = "centreon";
$mysql_passwd = 'centreon';
$mysql_host = "localhost:3306";
$mysql_database_oreon = "CENTREON_DB_USERNAME";
$mysql_database_ods = "CENTREON_DB_PASSWORD";

1;

Change CENTREON_DB_USERNAME & CENTREON_DB_PASSWORD with your information from /etc/centreon/centreon.conf.php

Set correct rights:

chmod 660 /etc/centreon/conf.pm
chown centreon: /etc/centreon/conf.pm

Restart Centreon processes:

systemctl restart centreon

 


Forum|alt.badge.img+3

in commande line : 

 

root@linux-centreon:/etc/cron.d# mysql -ucentreon -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 50231
Server version: 10.5.25-MariaDB-deb11 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



When i execute the script : 

root@linux-centreon:/etc/cron.d# /usr/share/centreon/cron/centreon-backup.pl
Couldn't connect: Access denied for user 'centreon'@'localhost' (using password: YES)


 


Forum|alt.badge.img+3

and also with the centreon user
centreon@linux-centreon:/etc/cron.d$ /usr/share/centreon/cron/centreon-backup.pl
Couldn't connect: Access denied for user 'centreon'@'localhost' (using password: YES)


Laurent
Centreonian
Forum|alt.badge.img+20
  • Centreonian
  • 965 replies
  • Answer
  • May 27, 2024

Oups sorry I made a mistake:

#############################################
# File Added by Centreon
#

$centreon_config = {
       VarLib => "/var/lib/centreon",
       CentreonDir => "/usr/share/centreon/",
       CacheDir => "/var/cache/centreon",
       "centreon_db" => "centreon",
       "centstorage_db" => "centreon_storage",
       "db_host" => "localhost:3306",
       "db_user" => "CENTREON_DB_USERNAME",
       "db_passwd" => 'CENTREON_DB_PASSWORD'
};

# Central, Remote or Poller ?
$instance_mode = "central";

# Centreon Centcore Command File
$cmdFile = "/var/lib/centreon/centcore.cmd";

# Deprecated format of Config file.
$mysql_user = "CENTREON_DB_USERNAME";
$mysql_passwd = 'CENTREON_DB_PASSWORD';
$mysql_host = "localhost:3306";
$mysql_database_oreon = "centreon";
$mysql_database_ods = "centreon_storage";

 


Forum|alt.badge.img+3

it’s works. Thanks

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings