Hello,
I made some changes to the file sc_broker.lua
i replaced broker_cache:get_host(host_id) by broker_cache:get_host(hostname_id)
in the brocker logs , I no longer have the error message
but i have another one in sc_event.lua
s1661245461] error: lua: error running function `write'/usr/share/lua/5.1/centreon-stream-connectors-lib/sc_event.lua:273: attempt to index field 'host' (a string value)
script contente
-- force host name to be its id if no name has been found
if not self.event.cache.host.name then
self.event.cache.host.name = self.event.cache.host.host_id or self.event.host_id
end
any idea please ?
Hello,
I’m going to take a look at this issue. In the mean time, could you please tell me which version of centreon you’re using and on which operating system (from the look of the link you used, I’m guessing you’re using version 21.04 but I want to be sure)
and also the result of the following command
luarocks list centreon-stream-connectors-lib
I don’t recall changing this part of the code and it should fail for every stream connector. But we had major changes on our broker in 22.04 so maybe I’ve overlooked something.
I’ll keep you updated today and thank you for your feedback
Hello @tcharles
thank you for your reply
here is the requested information :
Centreon version: 19.10.15
OS version : CentOS Linux release 7.8.2003 (Core)
luarocks list centreon-stream-connectors-lib
Warning: Failed loading manifest for /home/omoutii/.luarocks/lib64/luarocks/rocks: /home/omoutii/.luarocks/lib64/luarocks/rocks/manifest: No such file or directory
Installed rocks:
----------------
centreon-stream-connectors-lib
3.3.0-1 (installed) - /usr/lib64/luarocks/rocks
is this problem not related to my version of centreon?
About your version,
you should at least be running the 21.04 version of centreon (to be more specific, the 21.04.4 of our centreon-broker package whitch requires the 21.04.x version of centreon). The reason is that we fixed many issues regarding data that are forwarded from our broker to our stream connector.
On the stream connectors side, we are publishing features and fixes for at least version 21.04 of centreon.
Now, regarding your issue, I’ve took a look at our code, what you face makes no sense to me. Out of curiosity I’ll install a 19.10 Centreon just to try to understand how you can come up with those errors.
Anyway, even if I find an explanation to those error, you won’t have a working solution, mostly due to
https://docs.centreon.com/docs/21.04/releases/centreon-core/#bug-fixes-19
Fixed an issue that occasionally caused the LUA cache to disappear when reloading cbd
And just to let you know, we are currently running the 22.04 version of Centreon and you’ll find our product life cycle here : https://docs.centreon.com/docs/releases/lifecycle/#maintenance-table-for-centreon-versions
you are right, the best solution is to switch to a higher version of centreon I will try to upgrade I keep you informed.
Recommended version is 22.04. Please look at the table of supported versions.
issue resolved by upgrading centreon :)