Closed mat6211 closed 2 years ago
Hello,
normally, the configuration of your rules are stored in the centreon database. If you've restored all your Centreon, rules should be back
depending on the situation, you can check in your php log file centreon-error.log if you have any issue and/or in the /var/log/centreon/sql-error.log
Bonjour,
normallement la configuration des règles est stockée dans la base de données centreon. Si vous avez tout restauré, les règles devraient être présentes dans l'interface.
Selon la situation, vous pouvez vérifier dans le fichier de log php centreon-error.log et/ou dans le fichier /var/log/centreon/sql-error.log
In configuration -> notification -> open tickets, there are three rule menus but they all redirect to a blank page. I don't know how to fix this. Restoring the base seems complicated here
[07-Dec-2021 13:45:23 Europe/Paris] PHP Warning: Undefined array key 60101 in /usr/share/centreon/GPL_LIB/SmartyCache/compile/08733566300de20965fef175136b511c57c85013_0.file.hostDetails.ihtml.php on line 715 [07-Dec-2021 13:45:32 Europe/Paris] PHP Warning: require_once(/usr/share/centreon/www/modules/centreon-open-tickets/class/rule.php): Failed to open stream: No such file or directory in /usr/share/centreon/www/widgets/open-tickets/src/index.php on line 39 [07-Dec-2021 13:45:32 Europe/Paris] PHP Fatal error: Uncaught Error: Failed opening required '/usr/share/centreon/www/modules/centreon-open-tickets/class/rule.php' (include_path='/usr/share/centreon/vendor/pear/console_getopt:/usr/share/centreon/vendor/pear/pear-core-minimal/src:/usr/share/centreon/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php:/usr/share/pear:/usr/share/php') in /usr/share/centreon/www/widgets/open-tickets/src/index.php:39 Stack trace:
thrown in /usr/share/centreon/www/widgets/open-tickets/src/index.php on line 39 [07-Dec-2021 13:45:47 Europe/Paris] ERROR: No route found for "POST /centreon/api/beta/login" {"context":"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): No route found for \"POST /centreon/api/beta/login\" at /usr/share/centreon/vendor/symfony/http-kernel/EventListener/RouterListener.php:136)\n[previous exception] [object] (Symfony\Component\Routing\Exception\ResourceNotFoundException(code: 0): No routes found for \"/centreon/api/beta/login\". at /usr/share/centreon/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:70)"}
okay "perfect", the issue you're having is looks like a common problem with the /usr/share/centreon/www/modules/centreon-open-tickets/providers/register.php file
your rules are there in your database, but the webpage can't find the provider that you were using. The reason is that the register.php file doesn't have your provider registered in it.
We need two information to fix this. First, the id of the provider that you were using and then the name of said provider. Normally, you should have an error in the log files that I've indicated in my previous answer. With that we can retrieve the needed information. If you can't get your hand on that, I may be able to find a way to get the information from the database.
okay, "parfait", le problème que vous avez ressemble à un problème commun avec le fichier /usr/share/centreon/www/modules/centreon-open-tickets/providers/register.php
vos règles sont dans la base de données mais la page web ne peut trouver le provider que vous utilisez. La raison est que le fichier register.php ne contient pas le provider que vous aviez enregistré dedans.
Il me faut deux informations pour régler cela. La première est l'id de votre provider que vous utilisiez et le nom dudit provider. Normallement, vous devriez avoir une erreur dans les fichiers de logs que j'ai mentionné précédemment. Avec cela, on pourra récupérer les informations nécessaires. Si vous ne mettez pas la main sur les logs, je dois pouvoir trouver un moyen d'obtenir l'info depuis la base de données.
Dans register.php, j'ai ça (nous utilisons easyvista) :
$register_providers['Mail'] = 1; $register_providers['Glpi'] = 2; $register_providers['Otrs'] = 3; $register_providers['Simple'] = 4; $register_providers['BmcItsm'] = 5; $register_providers['Serena'] = 6; $register_providers['BmcFootprints11'] = 7; $register_providers['EasyvistaSoap'] = 8; $register_providers['ServiceNow'] = 9; $register_providers['Jira'] = 10; $register_providers['GlpiRestApi'] = 11; $register_providers['RequestTracker2'] = 12; $register_providers['Itop'] = 13;
A la lecture de la log, quand je clique sur la règle, j'ai ça :
[07-Dec-2021 14:15:01 Europe/Paris] PHP Fatal error: Uncaught PDOException: SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row in /usr/share/centreon/www/class/centreonDBStatement.class.php:111 Stack trace:
thrown in /usr/share/centreon/www/class/centreonDBStatement.class.php on line 111
we know how to add the configuration with our provider but we cannot go to the page to add it. There are three links to rule in configuration -> notifications and links to a blank page We have tried the following commands but it does not correct the problem yum remove centreon-open-tickets.noarch yum install centreon-open-tickets
Okay, the action you did may have done something bad in the database. Can you run the following sql query please
select * from centreon.topology where topology_url like "%ticket%" or topology_name like "%ticket%"\G
D'accord, les actions que vous avez fait peuvent avoir mis le bazar dans la base de données. Pouvez vous me donner le résultat de la requête suivante
select * from centreon.topology where topology_url like "%ticket%" or topology_name like "%ticket%"\G
1. row topology_id: 358 topology_name: Open Tickets topology_parent: 604 topology_page: NULL topology_order: NULL topology_group: 8 topology_url: NULL topology_url_opt: NULL topology_popup: 0 topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 2. row topology_id: 359 topology_name: Rules topology_parent: 604 topology_page: 60420 topology_order: 10 topology_group: 8 topology_url: ./modules/centreon-open-tickets/views/rules/index.php topology_url_opt: NULL topology_popup: NULL topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 3. row topology_id: 360 topology_name: Ticket Logs topology_parent: 203 topology_page: 20320 topology_order: 30 topology_group: 30 topology_url: ./modules/centreon-open-tickets/views/logs/index.php topology_url_opt: NULL topology_popup: 0 topology_modules: 0 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 4. row topology_id: 361 topology_name: Open Tickets topology_parent: 604 topology_page: NULL topology_order: NULL topology_group: 8 topology_url: NULL topology_url_opt: NULL topology_popup: 0 topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 5. row topology_id: 362 topology_name: Rules topology_parent: 604 topology_page: 60420 topology_order: 10 topology_group: 8 topology_url: ./modules/centreon-open-tickets/views/rules/index.php topology_url_opt: NULL topology_popup: NULL topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 6. row topology_id: 363 topology_name: Ticket Logs topology_parent: 203 topology_page: 20320 topology_order: 30 topology_group: 30 topology_url: ./modules/centreon-open-tickets/views/logs/index.php topology_url_opt: NULL topology_popup: 0 topology_modules: 0 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 7. row topology_id: 364 topology_name: Open Tickets topology_parent: 604 topology_page: NULL topology_order: NULL topology_group: 8 topology_url: NULL topology_url_opt: NULL topology_popup: 0 topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 8. row topology_id: 365 topology_name: Rules topology_parent: 604 topology_page: 60420 topology_order: 10 topology_group: 8 topology_url: ./modules/centreon-open-tickets/views/rules/index.php topology_url_opt: NULL topology_popup: NULL topology_modules: 1 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 9. row topology_id: 366 topology_name: Ticket Logs topology_parent: 203 topology_page: 20320 topology_order: 30 topology_group: 30 topology_url: ./modules/centreon-open-tickets/views/logs/index.php topology_url_opt: NULL topology_popup: 0 topology_modules: 0 topology_show: 1 is_deprecated: 0 topology_style_class: NULL topology_style_id: NULL topology_OnClick: NULL readonly: 1 is_react: 0 9 rows in set (0.001 sec)
Nous avons résolu le problème en désinstallant les composant depuis l'interface centreon puis en reinstallant les packages depuis le serveur
Hello, Following a reinstallation error, I no longer have the configuration of the rules related to open tickets Is it possible to restore them from a file?
[Fr] Bonjour, Suite à une erreur de réinstallation, je n'ai plus la configuration des règles liées à open tickets Est-il possible de les restaurer depuis un fichier ?