Influxdb
перезапустить Zabbix сервер
sudo systemctl restart zabbix-server.service
перезагрузить сервис telegraf
sudo systemctl restart telegraf.service
открыть конфигурационный файл telegraf
sudo nano /etc/telegraf/telegraf.conf
дебаг конфигурационного файла с помощью
journalctl -xeu telegraf.service
пример конфигурационного файла telegraf.conf
[agent]
interval = "40ms"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://10.8.0.42:8086"]
token = "1JuTSW-IIsUTur0-58274m18X4lTsdly8sYytKwVnLbkZiNqjLM7586y_KLKJPloI8leM0JKCKDxn-CxwnjpMQ=="
organization = "krost"
bucket = "bucket"
[[inputs.modbus]]
name = "Device"
slave_id = 1
timeout = "1s"
controller = "tcp://10.8.0.72:502"
holding_registers = [
{ name = "gvsTemp", byte_order = "AB", data_type = "UFIXED", scale=0.1, address = [9]},
{ name = "gvsY", byte_order = "AB", data_type = "UFIXED", scale=1.0, address = [29]},
{ name = "bitmask5", byte_order = "AB", data_type = "UINT16", scale=1.0, address = [5]},
]
[[inputs.opcua]]
name = "opcua"
endpoint = "opc.tcp://10.8.0.101:16550/MasterSCADA4D"
connect_timeout = "10s"
request_timeout = "5s"
security_mode = "None"
auth_method = "UserName"
username = "ea"
password = "ea"
[[inputs.opcua.group]]
name = "RSPL"
namespace = "1"
identifier_type = "i"
nodes = [
{name="Влажность", identifier="190313"},
{name="Титп", identifier="190284"},
{name="Тн", identifier="187952"},
]