configure mqtt and loki from borgmatic
This commit is contained in:
@@ -64,8 +64,23 @@
|
|||||||
servers = ["tcp://host:1883"]
|
servers = ["tcp://host:1883"]
|
||||||
username = "${MQTT_USER}"
|
username = "${MQTT_USER}"
|
||||||
password = "${MQTT_PASS}"
|
password = "${MQTT_PASS}"
|
||||||
topics = ["borgmatic/stats/#"]
|
topics = [
|
||||||
data_format = "json"
|
"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
|
# DATABASE
|
||||||
@@ -82,7 +97,7 @@
|
|||||||
pg_database_size(datname) AS size_bytes
|
pg_database_size(datname) AS size_bytes
|
||||||
FROM pg_database WHERE datname NOT IN ('template0', 'template1')
|
FROM pg_database WHERE datname NOT IN ('template0', 'template1')
|
||||||
"""
|
"""
|
||||||
withdbname = false
|
withdbname = true
|
||||||
measurement = "postgresql_database_size"
|
measurement = "postgresql_database_size"
|
||||||
|
|
||||||
[[inputs.postgresql_extensible.query]]
|
[[inputs.postgresql_extensible.query]]
|
||||||
@@ -92,9 +107,9 @@
|
|||||||
tablename AS table_name,
|
tablename AS table_name,
|
||||||
pg_total_relation_size(schemaname || '.' || tablename) AS size_bytes
|
pg_total_relation_size(schemaname || '.' || tablename) AS size_bytes
|
||||||
FROM pg_tables
|
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"
|
measurement = "postgresql_table_size"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -122,12 +137,12 @@
|
|||||||
domain = "http://host:3100"
|
domain = "http://host:3100"
|
||||||
timeout = "10s"
|
timeout = "10s"
|
||||||
|
|
||||||
[[outputs.mqtt]]
|
[[outputs.mqtt]]
|
||||||
servers = ["tcp://host:1883"]
|
servers = ["tcp://host:1883"]
|
||||||
username = "${MQTT_USER}"
|
username = "${MQTT_USER}"
|
||||||
password = "${MQTT_PASS}"
|
password = "${MQTT_PASS}"
|
||||||
topic = "telegraf/metrics"
|
topic = "telegraf/metrics"
|
||||||
qos = 0
|
qos = 0
|
||||||
retain = false
|
retain = false
|
||||||
client_id = "telegraf"
|
client_id = "telegraf"
|
||||||
data_format = "json"
|
data_format = "json"
|
||||||
|
|||||||
14202
telegraf/telegraf.default.conf
Normal file
14202
telegraf/telegraf.default.conf
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user