Skip to main content

Hello,

I have an issue with API, I tried to list all host on my central with :
<url_centreon>/centreon/api/index.php?action=action&object=centreon_clapi

Body:

{

    "action": "show",

    "object": "host"

}

 

I generate a token for my user, if I test it on my second central it works like a charm, but if I tried on my other central, I have an error 500 and I have no clue how to find the root cause.
If I do a clapi request to list all hosts, it’s working.
Any help to find what could going wrong would be appreciated.

 

Thx

Hi @nicnictout can you have a look in /var/log/php-fpm/centreon-error.log when you call this endpoint?


Hi,

only repeated errors are:
[29-Mar-2024 14:22:53 Europe/Paris] PHP Warning:  Undefined array key "orderby" in /usr/share/centreon/GPL_LIB/SmartyCache/compile/483356bf66061e547b8753551a133b246744ddb6_0.file.table.ihtml.php on line 285
>29-Mar-2024 14:22:53 Europe/Paris] PHP Warning:  Attempt to read property "value" on null in /usr/share/centreon/GPL_LIB/SmartyCache/compile/483356bf66061e547b8753551a133b246744ddb6_0.file.table.ihtml.php on line 285
 


I already tried to restart all centreon services, plus httpd and php.

Forgot to precise:
centreon 22.10.18

It was working since monthes without any issue before


Ok this error is about legacy form in Centreon.

Do you have errors in /var/log/centreon/sql-error.log?


Hello,

no error found in sql log :(


I continue my tests and if I try to do a getmember of hostgroup with GET method, it’s working...


OK we found the root cause, there was an entry in host DB corrupted. Once host added has been identified with logs and deleted from centreon, API works again.

Thx for your help


Reply