configure mqtt and loki from borgmatic

This commit is contained in:
2025-10-12 16:49:06 +02:00
parent 8ab9e7eed8
commit 281af93e60
2 changed files with 14231 additions and 14 deletions

View File

@@ -64,8 +64,23 @@
servers = ["tcp://host:1883"]
username = "${MQTT_USER}"
password = "${MQTT_PASS}"
topics = ["borgmatic/stats/#"]
data_format = "json"
topics = [
"borgmatic/stats/#",
]
data_format = "value"
data_type = "string"
name_override = "borgmatic_stats"
[[inputs.mqtt_consumer]]
servers = ["tcp://host:1883"]
username = "${MQTT_USER}"
password = "${MQTT_PASS}"
topics = [
"borgmatic/split/#"
]
data_format = "value"
data_type = "string"
name_override = "borgmatic_split"
###############################################################################
# DATABASE
@@ -82,7 +97,7 @@
pg_database_size(datname) AS size_bytes
FROM pg_database WHERE datname NOT IN ('template0', 'template1')
"""
withdbname = false
withdbname = true
measurement = "postgresql_database_size"
[[inputs.postgresql_extensible.query]]
@@ -92,9 +107,9 @@
tablename AS table_name,
pg_total_relation_size(schemaname || '.' || tablename) AS size_bytes
FROM pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema') AND schemaname NOT like '_timescaledb_%'
WHERE schemaname NOT IN ('pg_catalog', 'information_schema') AND schemaname NOT LIKE '_timescaledb_%'
"""
withdbname = true
withdbname = false
measurement = "postgresql_table_size"
###############################################################################
@@ -122,12 +137,12 @@
domain = "http://host:3100"
timeout = "10s"
[[outputs.mqtt]]
servers = ["tcp://host:1883"]
username = "${MQTT_USER}"
password = "${MQTT_PASS}"
topic = "telegraf/metrics"
qos = 0
retain = false
client_id = "telegraf"
data_format = "json"
[[outputs.mqtt]]
servers = ["tcp://host:1883"]
username = "${MQTT_USER}"
password = "${MQTT_PASS}"
topic = "telegraf/metrics"
qos = 0
retain = false
client_id = "telegraf"
data_format = "json"

14202
telegraf/telegraf.default.conf Normal file

File diff suppressed because it is too large Load Diff