ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.31k stars 658 forks source link

Kafka exporter - Additional parameters are not passed to librdkafka #8741

Closed DivaCtyWest closed 1 month ago

DivaCtyWest commented 1 month ago

Environment:

What happened: Attempted to pass multiple librdkafka parameters to the Kafka exporter but only the first one is observed.

How did you reproduce it? ntopng -i wlan0 -F kafka;broker;topic;security.protocol=SASL_SSL,debug=all I would expect librdkafka to generate increased logging but there isn't any. However, if the options are switched so that debug=all comes first, then the extra logging appears. ntopng -i wlan0 -F kafka;broker;topic;debug=all,security.protocol=SASL_SSL This makes me think that the extra Kafka options aren't being passed correctly. The documentation suggests that multiple parameters are supported and are to be separated with commas.

Debug Information: When debug=all is applied librdkafka will display the parameters it has been initialised with:

ntopng-1  | %7|1727948257.186|CONF|rdkafka#producer-1| [thrd:app]: Client configuration:
ntopng-1  | %7|1727948257.186|CONF|rdkafka#producer-1| [thrd:app]:   client.software.version = 2.3.0
ntopng-1  | %7|1727948257.186|CONF|rdkafka#producer-1| [thrd:app]:   metadata.broker.list = broker
ntopng-1  | %7|1727948257.187|CONF|rdkafka#producer-1| [thrd:app]:   debug = generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock,assignor,conf,all

Note that the security.protocol parameter doesn't appear. This seems to confirm that not all extra parameters are passed to librdkafka.

lucaderi commented 1 month ago

The split divisor was not "," but yu are right that makes more sense to use comma.

Fix done, new packages will be available in about 1h from now.

DivaCtyWest commented 1 month ago

Thanks @lucaderi . Do you know if this will be applied to other ntop utilities (especially Cento)?