Topics not getting listed

New Relic Infrastructure Question Template

  • Please provide a Permalink so we can see the exact time and place you are:

OS version : CentOS Linux 7
Kafka Version : 2.2

We installed the kafka integration on the broker hosts and in the kafka_config.yml file , when topic_mode: all, its not listing the topics in the monitoring tool. Even when topic_mode: regex , its giving invalid topic_mode in the logs

Error Log :
plugin name=kafka-metrics stderr="[ERR] Invalid topic mode regex\n"

kafka_config.yml :

integration_name: com.newrelic.kafka

instances:

  • name: kafka-metrics
    command: metrics
    arguments:
    cluster_name: “Kafka”
    zookeeper_hosts: ‘[{“host”: “xxxxxx”, “port”: 2181},{“host”: “xxxxx”, “port”: 2181},{“host”: “xxxx”, “port”: 2181}]’
    producers: ‘[{“name”: “my-producer”, “host”: “my-producer.my.localnet”, “port”: 9989}]’
    consumers: ‘[{“name”: “my-consumer”, “host”: “my-consumer.my.localnet”, “port”: 9987}]’
    topic_mode: Regex
    topic_regex : ‘abcd+’
    collect_broker_topic_data: true
    collect_topic_size: false
    trust_store: ‘/etc/client.truststore.jks’
    trust_store_password: ‘xxxxxxxxx’
    log_file : ‘/var/log/newrelic-infra/’
    labels:
    env: dev
    role: kafka

  • name: kafka-inventory
    command: inventory
    arguments:
    zookeeper_hosts: ‘[{“host”: “xxxx”, “port”: 2181},{“host”: “xxxx”, “port”: 2181},{“host”: “xxxxx”, “port”: 2181}]’
    topic_mode: Regex
    topic_regex : ‘abcd+’
    collect_broker_topic_data: true
    collect_topic_size: false
    log_file : ‘/var/log/newrelic-infra/’
    labels:
    env: dev
    role: kafka

Hi @meenaraj,

The [ERR] Invalid topic mode regex error you’re receiving is generated by the default case statement in the Kafka on-host integration, which indicates that the integration is not recognizing your topic_mode option. Could you try changing your topic_mode option to read as the following:

      topic_mode: 'regex'

And restart the agent. Also, could you show us the version of your Infrastructure agent and integration with the following:

yum list newrelic-infra nri-kafka

@sellefson topic_mode: ‘regex’ is not working either.

ERROR :
stderr="[ERR] Invalid topic mode regex\n"

topic_mode: ‘all’ is not also not listing the topics. After waiting for a long time & restarting the agent, saw this below line in the logs :

time=“2019-08-08T13:42:46Z” level=error msg=“executing data source” data prefix=integration/com.newrelic.kafka error=“signal: terminated” plugin name=kafka-metrics stderr=“2019/08/08 13:42:44 Connected to 10.104.40.116:2181\n2019/08/08 13:42:44 Authenticated: id=72216242294160556, timeout=4000\n2019/08/08 13:42:44 Re-submitting 0 credentials after reconnect\n[ERR] There are 871 topics in collection, the maximum amount of topics to collect is 300. Use the topic whitelist configuration parameter to limit collection size.\n”

Is there a way we whitelist certain topics?
How long does it take to relect the data in the GUI once the config file is updated.

Seeing the below errors as well in the log when topic_mode=‘all’;

time=“2019-08-08T13:43:00Z” level=warning msg=“unable to use upstart” error=“fork/exec /sbin/initctl: no such file or directory”
time=“2019-08-08T13:43:01Z” level=error msg=“processing update for kernel module” error=“Unable to get module info for ‘falcon_nf_netcontain’: exit status 1”
time=“2019-08-08T13:43:01Z” level=error msg=“processing update for kernel module” error=“Unable to get module info for ‘falcon_lsm_pinned_7503’: exit status 1”
time=“2019-08-08T13:43:03Z” level=error msg=“processing update for kernel module” error=“Unable to get module info for ‘falcon_lsm_serviceable’: exit status 1”
time=“2019-08-08T13:43:04Z” level=error msg=“processing update for kernel module” error=“Unable to get module info for ‘falcon_lsm_pinned_6703’: exit status 1”

yum list newrelic-infra nri-kafka >>

Installed
Installed Packages
newrelic-infra.x86_64 1.3.33-1 @newrelic-infra
nri-kafka.x86_64 2.1.0-1 @newrelic-infra
Available Packages
newrelic-infra.x86_64 1.5.0-1 newrelic-infra
nri-kafka.x86_64 2.2.1-1 newrelic-infra

Hi @meenaraj,

It looks like you have v2.1.0 of the Kafka integration installed, whereas v2.2.0 is where the topic_mode: regex option was introduced. If you update your nri-kafka package, I would expect that the "[ERR] Invalid topic mode regex\n" will be addressed.

You’ll need to try and ensure that the regex you set only matches up to 300 topics; otherwise you’ll encounter this error again:

[ERR] There are 871 topics in collection, the maximum amount of topics to collect is 300.

Is there a way we whitelist certain topics?

This is done by specificying either list or regex in your topic_mode and then adding a topic_list or topic_regex filter, respectively.

Seeing the below errors as well in the log when topic_mode=‘all’;

Those errors are coming from the Kernel module plugin of the Infrastructure agent, which collects which modules, their version, and their description tag and submits it to your host inventory. The falcon_lsm modules may have additional access controls that are preventing the agent from getting that information, but it shouldn’t affect any other data collection by the agent.