splunk kafka加载项不读取chef管理的配置文件

mbyulnm0  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(404)

我们使用chef来管理我们的基础设施,我遇到了一个问题,splunk ta(kafka的附加组件)只是拒绝承认我已经放弃了 kafka_credential.conf 文件在 local 插件的目录。如果我使用“webui”,它会正确地生成一个条目,并显示在附加组件配置中。

[root@ip-10-14-1-42 local]# ls
app.conf  inputs.conf  kafka.conf  kafka_credentials.conf
[root@ip-10-14-1-42 local]# grep -nr "" *.conf
app.conf:1:# MANAGED BY CHEF. PLEASE DO NOT MODIFY!
app.conf:2:[install]
app.conf:3:is_configured = 1
inputs.conf:1:# MANAGED BY CHEF. PLEASE DO NOT MODIFY!
inputs.conf:2:[kafka_mod]
inputs.conf:3:interval = 60
inputs.conf:4:start_by_shell = false
inputs.conf:5:
inputs.conf:6:[kafka_mod://my_app]
inputs.conf:7:kafka_cluster = default
inputs.conf:8:kafka_topic = log-my_app
inputs.conf:9:kafka_topic_group = my_app
inputs.conf:10:kafka_partition_offset = earliest
inputs.conf:11:index = main
kafka.conf:1:# MANAGED BY CHEF. PLEASE DO NOT MODIFY!
kafka.conf:2:[global_settings]
kafka.conf:3:log_level = INFO
kafka.conf:4:index = main
kafka.conf:5:use_kv_store = 0
kafka.conf:6:use_multiprocess_consumer = 1
kafka.conf:7:fetch_message_max_bytes = 1048576
kafka_credentials.conf:1:# MANAGED BY CHEF. PLEASE DO NOT MODIFY!
kafka_credentials.conf:2:[default]
kafka_credentials.conf:3:kafka_brokers = 10.14.2.164:9092,10.14.2.194:9092
kafka_credentials.conf:4:kafka_partition_offset = earliest
kafka_credentials.conf:5:index = main

重新启动splunk后,会安装附加组件,甚至在inputs部分下也会创建输入,但集群本身“不可用”,在检查日志时,我会看到:

2017-08-09 01:40:25,442 INFO pid=29212 tid=MainThread file=kafka_mod.py:main:168 | Start Kafka
2017-08-09 01:40:30,508 INFO pid=29212 tid=MainThread file=kafka_config.py:_get_kafka_clusters:228 | Clusters: {}
2017-08-09 01:40:30,509 INFO pid=29212 tid=MainThread file=kafka_config.py:__init__:188 | No Kafka cluster are configured

似乎这个插件只考虑通过webui创建的集群。这是行不通的,因为我们希望能够完全配置通过厨师。除了破解restapi,篡改addon目录中的.py文件并强制输入字典之外,我还有什么选择呢?
想知道以前是否有人遇到过这种情况。

ssm49v7z

ssm49v7z1#

如果非要我猜是因为 # 通常不用于ini文件中的注解。试试看 ; 相反。

相关问题