|
@@ -4594,64 +4594,64 @@
|
4594
|
4594
|
# # unique_timestamp = "auto"
|
4595
|
4595
|
|
4596
|
4596
|
|
4597
|
|
-# # Read metrics from MQTT topic(s)
|
4598
|
|
-# [[inputs.mqtt_consumer]]
|
4599
|
|
-# ## MQTT broker URLs to be used. The format should be scheme://host:port,
|
4600
|
|
-# ## schema can be tcp, ssl, or ws.
|
4601
|
|
-# servers = ["tcp://localhost:1883"]
|
4602
|
|
-#
|
4603
|
|
-# ## QoS policy for messages
|
4604
|
|
-# ## 0 = at most once
|
4605
|
|
-# ## 1 = at least once
|
4606
|
|
-# ## 2 = exactly once
|
4607
|
|
-# ##
|
4608
|
|
-# ## When using a QoS of 1 or 2, you should enable persistent_session to allow
|
4609
|
|
-# ## resuming unacknowledged messages.
|
4610
|
|
-# qos = 0
|
4611
|
|
-#
|
4612
|
|
-# ## Connection timeout for initial connection in seconds
|
4613
|
|
-# connection_timeout = "30s"
|
4614
|
|
-#
|
4615
|
|
-# ## Maximum messages to read from the broker that have not been written by an
|
4616
|
|
-# ## output. For best throughput set based on the number of metrics within
|
4617
|
|
-# ## each message and the size of the output's metric_batch_size.
|
4618
|
|
-# ##
|
4619
|
|
-# ## For example, if each message from the queue contains 10 metrics and the
|
4620
|
|
-# ## output metric_batch_size is 1000, setting this to 100 will ensure that a
|
4621
|
|
-# ## full batch is collected and the write is triggered immediately without
|
4622
|
|
-# ## waiting until the next flush_interval.
|
4623
|
|
-# # max_undelivered_messages = 1000
|
4624
|
|
-#
|
4625
|
|
-# ## Topics to subscribe to
|
4626
|
|
-# topics = [
|
4627
|
|
-# "telegraf/host01/cpu",
|
4628
|
|
-# "telegraf/+/mem",
|
4629
|
|
-# "sensors/#",
|
4630
|
|
-# ]
|
4631
|
|
-#
|
4632
|
|
-# # if true, messages that can't be delivered while the subscriber is offline
|
4633
|
|
-# # will be delivered when it comes back (such as on service restart).
|
4634
|
|
-# # NOTE: if true, client_id MUST be set
|
4635
|
|
-# persistent_session = false
|
4636
|
|
-# # If empty, a random client ID will be generated.
|
4637
|
|
-# client_id = ""
|
4638
|
|
-#
|
4639
|
|
-# ## username and password to connect MQTT server.
|
4640
|
|
-# # username = "telegraf"
|
4641
|
|
-# # password = "metricsmetricsmetricsmetrics"
|
4642
|
|
-#
|
4643
|
|
-# ## Optional TLS Config
|
4644
|
|
-# # tls_ca = "/etc/telegraf/ca.pem"
|
4645
|
|
-# # tls_cert = "/etc/telegraf/cert.pem"
|
4646
|
|
-# # tls_key = "/etc/telegraf/key.pem"
|
4647
|
|
-# ## Use TLS but skip chain & host verification
|
4648
|
|
-# # insecure_skip_verify = false
|
4649
|
|
-#
|
4650
|
|
-# ## Data format to consume.
|
4651
|
|
-# ## Each data format has its own unique set of configuration options, read
|
4652
|
|
-# ## more about them here:
|
4653
|
|
-# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
|
4654
|
|
-# data_format = "influx"
|
|
4597
|
+# Read metrics from MQTT topic(s)
|
|
4598
|
+[[inputs.mqtt_consumer]]
|
|
4599
|
+ ## MQTT broker URLs to be used. The format should be scheme://host:port,
|
|
4600
|
+ ## schema can be tcp, ssl, or ws.
|
|
4601
|
+ servers = ["tcp://{{ server_fqdn }}:1883"]
|
|
4602
|
+
|
|
4603
|
+ ## QoS policy for messages
|
|
4604
|
+ ## 0 = at most once
|
|
4605
|
+ ## 1 = at least once
|
|
4606
|
+ ## 2 = exactly once
|
|
4607
|
+ ##
|
|
4608
|
+ ## When using a QoS of 1 or 2, you should enable persistent_session to allow
|
|
4609
|
+ ## resuming unacknowledged messages.
|
|
4610
|
+ qos = 0
|
|
4611
|
+
|
|
4612
|
+ ## Connection timeout for initial connection in seconds
|
|
4613
|
+ connection_timeout = "30s"
|
|
4614
|
+
|
|
4615
|
+ ## Maximum messages to read from the broker that have not been written by an
|
|
4616
|
+ ## output. For best throughput set based on the number of metrics within
|
|
4617
|
+ ## each message and the size of the output's metric_batch_size.
|
|
4618
|
+ ##
|
|
4619
|
+ ## For example, if each message from the queue contains 10 metrics and the
|
|
4620
|
+ ## output metric_batch_size is 1000, setting this to 100 will ensure that a
|
|
4621
|
+ ## full batch is collected and the write is triggered immediately without
|
|
4622
|
+ ## waiting until the next flush_interval.
|
|
4623
|
+ # max_undelivered_messages = 1000
|
|
4624
|
+
|
|
4625
|
+ ## Topics to subscribe to
|
|
4626
|
+ ## matches tasmota "$room/$app/tele/STATE" and "$room/$app/tele/SENSOR"
|
|
4627
|
+ topics = [
|
|
4628
|
+ "+/+/tele/SENSOR",
|
|
4629
|
+ "+/+/tele/STATE",
|
|
4630
|
+ ]
|
|
4631
|
+
|
|
4632
|
+ # if true, messages that can't be delivered while the subscriber is offline
|
|
4633
|
+ # will be delivered when it comes back (such as on service restart).
|
|
4634
|
+ # NOTE: if true, client_id MUST be set
|
|
4635
|
+ persistent_session = false
|
|
4636
|
+ # If empty, a random client ID will be generated.
|
|
4637
|
+ client_id = "iot-mqtt-bridge"
|
|
4638
|
+
|
|
4639
|
+ ## username and password to connect MQTT server.
|
|
4640
|
+ username = "{{ lights_web_username }}"
|
|
4641
|
+ password = "{{ lights_web_password }}"
|
|
4642
|
+
|
|
4643
|
+ ## Optional TLS Config
|
|
4644
|
+ # tls_ca = "/etc/telegraf/ca.pem"
|
|
4645
|
+ # tls_cert = "/etc/telegraf/cert.pem"
|
|
4646
|
+ # tls_key = "/etc/telegraf/key.pem"
|
|
4647
|
+ ## Use TLS but skip chain & host verification
|
|
4648
|
+ # insecure_skip_verify = false
|
|
4649
|
+
|
|
4650
|
+ ## Data format to consume.
|
|
4651
|
+ ## Each data format has its own unique set of configuration options, read
|
|
4652
|
+ ## more about them here:
|
|
4653
|
+ ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
|
|
4654
|
+ data_format = "json"
|
4655
|
4655
|
|
4656
|
4656
|
|
4657
|
4657
|
# # Read metrics from NATS subject(s)
|