我有一个 ActiveMQ 代理,数据正在进入该代理内的队列。
我正在尝试从同一个代理读取数据,但我无法读取数据。
下面我给出了我的电报配置。我提供了主题名称。我尝试创建一个主题并发送自定义数据以及我能够正确读取的数据。
[[inputs.mqtt_consumer]]
servers = ["provided"]
qos = 0
## Topics that will be subscribed to.
topics = [
"topic_name",
]
connection_timeout = "30s"
## If unset, a random client ID will be generated.
client_id = "telegraf"
## Username and password to connect MQTT server.
username = "provided"
password = "provided"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
[[inputs.activemq]]
## ActiveMQ WebConsole URL
url = "provided"
## Required ActiveMQ Endpoint
## deprecated in 1.11; use the url option
# server = "192.168.50.10"
# port = 8161
## Credentials for basic HTTP authentication
username = "provided"
password = "provided"
[[outputs.file]]
## ## Files to write to, "stdout" is a specially handled file.
files = ["stdout","/etc/telegraf/metrics.out"]
来自设备的数据将进入队列,而不是主题。
如您所见,数据存在于队列中。所以现在我的主要问题是如何从队列中读取数据而不是使用电报从主题中读取数据?