Hello,
at the last houres I try to get a connection to a SDM630 device via RS486 via USB-Dongle. The last configuration of telegraf:
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = "0s"
hostname = ""
omit_hostname = false
debug = true
# logtarget = "file"
# logfile = "/var/log/telegraf/telegraf.log"
[[outputs.influxdb]]
database = "telegraf"
urls = ["http://127.0.0.1:8086"]
username = "telegraf"
password = "telegraf"
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
core_tags = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.mem]]
[[inputs.net]]
[[inputs.system]]
[[inputs.swap]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.kernel]]
# Retrieve data from MODBUS slave devices
[[inputs.modbus]]
name = "SDM630"
slave_id = 1
timeout = "1s"
controller = "file:///dev/ttyUSB0"
baud_rate = 9600
data_bits = 8
parity = "N"
stop_bits = 1
transmission-mode = "RTU"
debug_connection = true
configuration_type = "register"
I get every time the same result:
root@sentinel:/etc/telegraf# telegraf -test -config /etc/telegraf/telegraf.conf --debug
2022-09-17T18:39:44Z I! Starting Telegraf 1.24.0
2022-09-17T18:39:44Z I! Available plugins: 222 inputs, 9 aggregators, 26 processors, 20 parsers, 57 outputs
2022-09-17T18:39:44Z I! Loaded inputs: cpu disk kernel mem modbus net netstat processes swap system
2022-09-17T18:39:44Z I! Loaded aggregators:
2022-09-17T18:39:44Z I! Loaded processors:
2022-09-17T18:39:44Z W! Outputs are not used in testing mode!
2022-09-17T18:39:44Z I! Tags enabled: host=sentinel
2022-09-17T18:39:44Z D! [agent] Initializing plugins
2022-09-17T18:39:44Z E! [telegraf] Error running agent: could not initialize input inputs.modbus: initializing client failed: invalid protocol 'file' - ''
root@sentinel:/etc/telegraf#
All the debug and logging options are complete useless for me! Whats wrong?