Closed Rico29 closed 8 months ago
Hi @Rico29, seems your poller.php has not enough permissions to reach centreon.conf.php which grants weathermap access to the database. You may try to increase it using chmod, also, ensure these directories have write permission:
/usr/share/centreon/www/modules/centreon-weathermap/src/configs
/usr/share/centreon/www/modules/centreon-weathermap/src/output
/usr/share/centreon/www/modules/centreon-weathermap/src/images
you may ignore those deprecated warnings or omit them, prepending a @ operator
let me know if you managed to fix it by changing permissions
Hello, I'm getting the same error messages as Rico29. I've made sure that these directories have write permissions /usr/share/centreon/www/modules/centreon-weathermap/src/configs /usr/share/centreon/www/modules/centreon-weathermap/src/output /usr/share/centreon/www/modules/centreon-weathermap/src/images
hi @Tolkyen, have you ensure centreon-engine is the owner of output directory?
Yes, this is the current setting
@Tolkyen can you show how are permission settings for poller.php?
I just removed my module and re-download it from this repo
and I ran the following:
sudo chown -R apache:apache /usr/share/centreon/www/modules/centreon-weathermap/
chown -R centreon-engine:apache /usr/share/centreon/www/modules/centreon-weathermap/src/output/
chmod 777 /usr/share/centreon/www/modules/centreon-weathermap/poller.php
reactivated the module from extension manager
and ran sudo -u centreon-engine /usr/share/centreon/www/modules/centreon-weathermap/poller.php
I got the following output without errors:
2024-03-04 18:48 - 0 processed
can you confirm these steps?
I used php 8.1.12
-rw-r--r-- 1 apache apache /etc/centreon/centreon.conf.php
Hi @kozfelipe, I followed your instructions. I've found the reason for the error: you need to add read access for others to the /etc/centreon/centreon.conf.php file.. This is less secure than what the centreon documentation recommends (https://docs.centreon.com/docs/23.04/administration/secure-platform/#securing-configuration-files).
Thank you for your help.
Very well, I'm glad you made it
Hello I installed your adapted weathermap in centreon, using php8.1
problem is that the created service "weathermap poller" calls the following command using centreon-engine user :
php /usr/share/centreon/www/modules/centreon-weathermap/php/../poller.php
which results in errors :
/usr/share/centreon/config/centreon.config.php tried to include : require _CENTREONETC . '/centreon.conf.php';
so I've set-up a crontab qhich generates the output images
but I still have warnings like :