Skip to main content

23.10 broker documentation for Unified SQL output states

unified-sql-type outputs have the following parameters:

  • ..
  • Connections count Number of connections to the database maintained by this output. This allows broker to write data in parallel using up to 3 connections:

    • 1: all the database traffic goes through only one connection. It is fine for small platforms.
    • 2: one connection is dedicated to the traffic (BULK INSERT statements) towards the data_bin and logs tables and the second one handles the rest.
    • 3: two connections are dedicated to the traffic (BULK INSERT statements) towards the data_bin and logs tables and the third one handles the rest. We recommend this setting for large platforms.

But looking at actual 23.10 broker configuration UI for Unified SQL I don’t see “Connections count” named setting. There is however a “Number of connection to the database” but (?) for that parameter states “Usually cpus/2”.

So which is it? Is UI’s “Number of connection to the database” setting same as documentations “Connections count” and which is incorrect, documentation or UI’s help?

 

After reading centreon-collect source https://github.com/centreon/centreon-collect/blob/39916b6d050ca23433dae323e4ca6bee7f5a0c1e/broker/core/sql/src/mysql.cc and testing different values it seems that documentation for this option is false.

Can someone from Centreon verify that 23.10 version documentation for “Connections count” is incorrect?


Hi,

The documentation is not totally wrong and is in fact quite true. But things in reality are more complicated.

 

You don’t show the good cpp file, this one concerns our object to send queries to the database. If you want to see what we explain in the documentation, you should take a look at the file `broker/unified_sql/src/stream.cc`. There, you will see the constructor of the stream and inside, it is easy to find the switch with the three cases.

 

But as you say, there other connections to the database established by Broker, for example, each BAM streams have their own connections, also when you rebuild some RRD graph, a specific connection is established to the database to make the query.

 

In a nutshell, the documentation talks about the unified-sql output in nominal operation and we did not want to explain all the cases of connection that can be very disturbing.

 

Regards.

David.

 


 

Looking at switch statement documentation is not quite right, it defaults to 2 dedicated connections is value is anything other than 1 or 2.

Parameter help in GUI is wrong though, please consider fixing that.


Your’re right, we will change the parameter help in GUI.


Reply