ΠΠ³Π΅Π½Ρ Π΄Π»Ρ ΡΠ±ΠΎΡΠ° ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ
ΡΠ΅ΡΠ²Π΅ΡΠ½ΡΡ
Π°Π½Π°Π»ΠΈΡΠΈΠΊ Ρ ΠΎΡΠΊΡΡΡΡΠΌ ΠΈΡΡ
ΠΎΠ΄Π½ΡΠΌ ΠΊΠΎΠ΄ΠΎΠΌ. ΠΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ ΡΠΎΠ±ΠΈΡΠ°ΡΡ ΡΠ°Π·Π»ΠΈΡΠ½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ Π΄Π»Ρ ΠΎΡΠ³Π°Π½ΠΈΠ·Π°ΡΠΈΠΈ ΠΌΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³Π° ΡΠΈΡΡΠ΅ΠΌ ΠΈ ΠΏΠ΅ΡΠ΅Π΄Π°Π²Π°ΡΡ ΠΈΡ
Π² ΡΠ°Π·Π»ΠΈΡΠ½ΡΠ΅ ΡΠΈΡΡΠ΅ΠΌΡ ΡΠ±ΠΎΡΠ° ΠΈ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΠΈ. Π ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΌ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ Π² ΡΠ²ΡΠ·ΠΊΠ΅ Ρ influxdb, Π½ΠΎ ΡΠ°ΠΊ ΠΆΠ΅ ΠΌΠΎΠΆΠ΅Ρ ΠΏΠΈΡΠ°ΡΡ Π² Π»ΠΎΠ³ΠΈ ΠΈ Π² mqtt ΠΈ ΠΈ.Π΄.
ΠΠΌΠ΅Π΅Ρ ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ
ΠΏΠ»Π°Π³ΠΈΠ½ΠΎΠ² Π΄Π»Ρ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΡ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»Π°: Plugin directory | Telegraf Documentation
ΠΡΠΈΡΠΈΠ°Π»ΡΠ½ΡΠΉ ΡΠ°ΠΉΡ: Telegraf | InfluxData
ΠΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³ linux ΡΠΈΡΡΠ΅ΠΌΡ
Docker compose ΡΠ°ΠΉΠ»:
Telegraf
ΠΠΎΠ½ΡΠΈΠ³ Π½Π°ΡΡΡΠΎΠ΅ΠΊ ΡΠ°ΠΉΠ»Π΅ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ, Π° ΡΠ°ΠΊ ΠΆΠ΅ Ρ
ΡΠ°Π½ΠΈΡΡΡ Π² influxdb
version: "3"
services:
telegraf:
image: telegraf:latest
container_name: telegraf
environment:
- HOST_ETC=/hostfs/etc
- HOST_PROC=/hostfs/proc
- HOST_SYS=/hostfs/sys
- HOST_VAR=/hostfs/var
- HOST_RUN=/hostfs/run
- HOST_MOUNT_PREFIX=/hostfs
- TZ=Europe/Moscow
volumes:
- /:/hostfs:ro
- /docker/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ:
Telegraf
[global_tags]
[agent]
interval = "30s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
hostname = "Armbian"
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://192.168.0.135:8086"]
token = "<TOKEN>"
organization = "influxdb"
bucket = "system-monitoring"
[[inputs.cpu]]
percpu = false
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
mount_points = ["/"]
[[inputs.diskio]]
[[inputs.linux_sysctl_fs]]
[[inputs.mem]]
[[inputs.nstat]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.temp]]
ΠΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³ OpenWrt
Docker compose ΡΠ°ΠΉΠ»:
ΠΠΎΠ½ΡΠΈΠ³ Π½Π°ΡΡΡΠΎΠ΅ΠΊ ΡΠ°ΠΉΠ»Π΅ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ, Π° ΡΠ°ΠΊ ΠΆΠ΅ Ρ
ΡΠ°Π½ΠΈΡΡΡ Π² influxdb
version: "3"
services:
telegraf-openwrt:
image: telegraf:latest
container_name: telegraf-openwrt
environment:
- TZ=Europe/Moscow
volumes:
- /docker/telegraf-openwrt/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /docker/telegraf-openwrt/types.db:/usr/share/collectd/types.db
ports:
- "8094:8094/udp"
ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ:
[global_tags]
[agent]
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = "0s"
hostname = "Perenio"
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://192.168.0.137:8086"]
token = "<TOKEN>"
organization = "influxdb"
bucket = "openwrt"
[[inputs.socket_listener]]
service_address = "udp://0.0.0.0:8094"
data_format = "collectd"
collectd_typesdb = ["/usr/share/collectd/types.db"]
Π€Π°ΠΉΠ» Π±Π°Π·Ρ: ![[types.db]]
ΠΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³ NUT
Docker compose ΡΠ°ΠΉΠ»:
Telegraf-nut
ΠΠΎΠ½ΡΠΈΠ³ Π½Π°ΡΡΡΠΎΠ΅ΠΊ ΡΠ°ΠΉΠ»Π΅ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ, Π° ΡΠ°ΠΊ ΠΆΠ΅ Ρ
ΡΠ°Π½ΠΈΡΡΡ Π² influxdb
version: "3"
services:
telegraf-nut:
image: telegraf:latest
container_name: telegraf-nut
environment:
- TZ=Europe/Moscow
volumes:
- /docker/telegraf-nut/telegraf.conf:/etc/telegraf/telegraf.conf:ro
ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ:
Telegraf-Nut
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_jitter = "0s"
precision = ""
hostname = "Armbian"
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://192.168.0.135:8086"]
token = "<TOKEN>"
organization = "influxdb"
bucket = "nut"
[[inputs.upsd]]
server = "192.168.0.137"
port = 3493
username = "deniom"
password = "Ap256216"
additional_fields = ["*"]
[[processors.enum]]
[[processors.enum.mapping]]
field = "ups_beeper_status"
[processors.enum.mapping.value_mappings]
true = "enabled"
false = "disabled"
ΠΡΠΈΠΌΠ΅ΡΠ°Π½ΠΈΠ΅:: Π‘Π±ΠΎΡ Π΄Π°Π½Π½ΡΡ
ΠΌΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³Π°