Skip to main content
Question

Hosts are not diplayed in ressouces status in 23.10.6

  • January 23, 2024
  • 18 replies
  • 672 views

Forum|alt.badge.img+2

Hello,  I’m an intern in a company and i need to upgrade Centreon from 21.10.5 to 23.10.6

So 1st thing I need to say is that I’m on a copy of the production server ( I am on a copy of the main server so as not to do anything wrong with the main server)

i followed all the steps on the official documentation from Centreon and i have a problem : i can’t display hosts on the 23.10.6 version of Centreon (but it was OK before the upgrade). i have this error in /var/log/centreon/centreon-web.log :

[2024-01-23T10:53:13+0100] [ERROR] [Core\Resources\Application\UseCase\FindResourcesByParent\FindResourcesByParent:127]: Warning: Undefined array key "metrics" {"trace":"#0 /usr/share/centreon/src/Core/Resources/Infrastructure/API/FindResourcesByParent/FindResourcesByParentPresenter.php(67): Core\\Resources\\Infrastructure\\API\\FindResourcesByParent\\FindResourcesByParentPresenter->createResourceFromResponse()\n#1 /usr/share/centreon/src/Core/Resources/Application/UseCase/FindResourcesByParent/FindResourcesByParent.php(123): Core\\Resources\\Infrastructure\\API\\FindResourcesByParent\\FindResourcesByParentPresenter->presentResponse()\n#2 /usr/share/centreon/src/Core/Resources/Infrastructure/API/FindResourcesByParent/FindResourcesByParentController.php(61): Core\\Resources\\Application\\UseCase\\FindResourcesByParent\\FindResourcesByParent->__invoke()\n#3 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(163): Core\\Resources\\Infrastructure\\API\\FindResourcesByParent\\FindResourcesByParentController->__invoke()\n#4 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#5 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#6 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#7 {main}"}

 

All my table are good (resources and hosts tables are filled correctly) I can display services on resource status and see my hosts in Configuration > Hosts > Hosts but i can’t see them in resource status and when I’m reloading the page I get this : Error while searching for resources

I restarted all services many times and it does nothing

I’m on Alma Linux 8

18 replies

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 23, 2024

Hi @Ogoncalves did you restarted “cbd” process after the update?

systemctl restart cbd

Then did you export/move/restart configuration?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 23, 2024

Hi , yes I restarted cbd process and exported the configuration , nothing changed, same type of error in centreon-web.log

 

[2024-01-23T13:31:53+0100] [ERROR] [Core\Resources\Application\UseCase\FindResources\FindResources:72]: Warning: Undefined array key "metrics" {"trace":"#0 /usr/share/centreon/src/Core/Resources/Application/UseCase/FindResources/FindResources.php(65): Core\\Resources\\Infrastructure\\API\\FindResources\\FindResourcesPresenter->presentResponse()\n#1 /usr/share/centreon/src/Core/Resources/Infrastructure/API/FindResources/FindResourcesController.php(61): Core\\Resources\\Application\\UseCase\\FindResources\\FindResources->__invoke()\n#2 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(163): Core\\Resources\\Infrastructure\\API\\FindResources\\FindResourcesController->__invoke()\n#3 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#4 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#5 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#6 {main}"}

 

(expect maybe the end of the error : there is no more “  /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#7 {main}"}  ” at the end )


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 23, 2024

Hi, do you have errors in /var/log/centreon-sql-errors.log when you access to Resource Status?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 23, 2024

I wanted to check the log file but i don’t have se same path as you,

i have  /var/log/centreon/sql-error.log

and in this log file i have nothing

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 23, 2024

Can you try in private navigation if you have the same problem?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 23, 2024

same problem in private navigation, I deleted my cache from firefox history and it’s doing the same error


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 24, 2024

So to summary you can’t see host in “Monitoring > Resources Status” menu but you can see services.

When you access to “Monitoring > Resources Status” you have errors in centreon-web.log.

Can you try to select value of an host using:

USE centreon_storage;
SELECT * FROM resources WHERE name = '<HOST_NAME>'\G

Change “<HOST_NAME>” by the name of an host


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 24, 2024

I tried with multiple hosts and it’s working (i have informations)  but value for internal_id and severity_id is NULL do you want all informations ?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 24, 2024

there is also no parent id on the hosts, I don't know if this is normal


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 24, 2024

and when I’m checking on the main server in production (it’s on 21.10.5) , there is no table called resources

on the bottom there are the new tables


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 24, 2024

I clearly don’t know why it’s doing this because before the update from 21.10.15 to 23.10.6 it was functional  100%


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 24, 2024

Recently we added a new table resources to merge hosts and services into one table to improve performance for “Resources Status” menu, that’s why this table was not present before.

The timestamp for last_check column indicate that values are updated (24/01/2024 10:57:06).

So I don’t know why API can’t get “metrics” value.

Can you check in /var/log/centreon-broker/central-broker-master.log that you don’t have errors?


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 25, 2024

i don’t have any errors in central-broker-master.log but i think i missed something about the update. when I’m doing a dnf update or a yum update (which is 1.3GB by the way) i cannot do it and i have this

 


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 25, 2024

Now I remembered that I got this warning when I updated from 21.10.5  to 21.10.15 ( i wasn’t allowed to update directly to the last minor version on Centreon 21.10.x which is 21.10.17).

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • January 25, 2024

Hi @Ogoncalves Alma Linux changed it key => https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 26, 2024

I did the update but nothing happened, same problem.


Forum|alt.badge.img+2
  • Author
  • Steward *
  • January 31, 2024

Hi, so i tried to restart the upgrade by going back in 21.10.5, and even doing the steps one by one, slowly to be sure to not miss something, it’s doing the sames errors in centeron-web.log but this time I have errors in /var/log/centreon-broker/central-broker-master.log ! hope it helps

errors in /var/log/centreon-broker/central-broker-master.log

 


Forum|alt.badge.img+2
  • Author
  • Steward *
  • February 7, 2024

Hi, does anyone have any answers to this problem? I tried many things but still no host on resource status