mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-09-20 07:27:25 +02:00
1.4 KiB
1.4 KiB
mqtt
sink
The mqtt
sink publishes all metrics into a MQTT network.
Configuration structure
{
"<name>": {
"type": "mqtt",
"client_id" : "myid",
"persistence_directory": "/tmp",
"batch_size": 1000,
"flush_delay": "1s",
"dial_protocol": "tcp",
"host": "dbhost.example.com",
"port": 1883,
"user": "exampleuser",
"password" : "examplepw",
"pause_timeout": "1s",
"keep_alive_seconds": 10,
"meta_as_tags" : [],
}
}
type
: makes the sink anmqtt
sinkclient_id
: MQTT clients use a client_id to talk to the brokerpersistence_directory
: MQTT stores messages temporarly on disc if the broker is not available. Folder needs to be writable (default:/tmp
)pause_timeout
: Waittime when published failedkeep_alive_seconds
: Keep the connection alive for some time. Recommended to be longer than globalinterval
.flush_delay
: Group metrics coming in to a single batchbatch_size
: Maximal batch size. Ifbatch_size
is reached before the end offlush_delay
, the metrics are sent without further delaydial_protocol
: Usetcp
orudp
for the MQTT communicationhost
: Hostname of the MQTT brokerport
: Port number of the MQTT brokeruser
: Username for authenticationpassword
: Password for authenticationmeta_as_tags
: print all meta information as tags in the output (optional)