jurajmarcin / telegraf-bacnet Goto Github PK
View Code? Open in Web Editor NEWTelegraf execd plugin for BACnet
License: MIT License
Telegraf execd plugin for BACnet
License: MIT License
Hi,
i want to test the telegraf-bacnet plugin. When i try the config check, following error occours:
PS C:\Program Files\InfluxData\telegraf\telegraf-bacnet> C:\"Program Files"\InfluxData\telegraf\telegraf.exe --config C:\"Program Files"\InfluxData\telegraf\telegraf.conf --test
2023-05-26T11:59:11Z I! Loading config: C:\Program Files\InfluxData\telegraf\telegraf.conf
2023-05-26T11:59:11Z I! Starting Telegraf 1.26.3
2023-05-26T11:59:11Z I! Available plugins: 235 inputs, 9 aggregators, 27 processors, 22 parsers, 57 outputs, 2 secret-stores
2023-05-26T11:59:11Z I! Loaded inputs: execd
2023-05-26T11:59:11Z I! Loaded aggregators:
2023-05-26T11:59:11Z I! Loaded processors:
2023-05-26T11:59:11Z I! Loaded secretstores:
2023-05-26T11:59:11Z W! Outputs are not used in testing mode!
2023-05-26T11:59:11Z I! Tags enabled: host=DESKTOP-SGRT5RI
2023-05-26T11:59:11Z I! [inputs.execd] Starting process: telegrafbacnet [--config C:\Program Files\InfluxData\telegraf\telegraf-bacnet\config.toml]
2023-05-26T11:59:12Z E! [inputs.execd] stderr: "Traceback (most recent call last):"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tomlconfig\\__init__.py\", line 77, in parse"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " _update(self, load(file))"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " ^^^^^^^^^^"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tomllib\\_parser.py\", line 66, in load"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " return loads(s, parse_float=parse_float)"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tomllib\\_parser.py\", line 102, in loads"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " pos = key_value_rule(src, pos, out, header, parse_float)"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tomllib\\_parser.py\", line 349, in key_value_rule"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " raise suffixed_err(src, pos, \"Cannot overwrite a value\")"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: "tomllib.TOMLDecodeError: Cannot overwrite a value (at line 101, column 27)"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: ""
2023-05-26T11:59:12Z E! [inputs.execd] stderr: "The above exception was the direct cause of the following exception:"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: ""
2023-05-26T11:59:12Z E! [inputs.execd] stderr: "Traceback (most recent call last):"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"<frozen runpy>\", line 198, in _run_module_as_main"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"<frozen runpy>\", line 88, in _run_code"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\telegrafbacnet.exe\\__main__.py\", line 7, in <module>"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\telegrafbacnet\\__init__.py\", line 32, in main"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " if isdir(args.config) else parse(Config, conf_path=args.config)"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " File \"C:\\Users\\localadmin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tomlconfig\\__init__.py\", line 93, in parse"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: " raise ConfigError(f\"Error parsing the file {file_path}: {ex}\") from ex"
2023-05-26T11:59:12Z E! [inputs.execd] stderr: "tomlconfig.ConfigError: Error parsing the file C:\\Program Files\\InfluxData\\telegraf\\telegraf-bacnet\\config.toml: Cannot overwrite a value (at line 101, column 27)"
2023-05-26T11:59:12Z I! [inputs.execd] Process C:\Users\localadmin\AppData\Local\Programs\Python\Python311\Scripts\telegrafbacnet.exe shut down
2023-05-26T11:59:12Z E! [telegraf] Error running agent: input plugins recorded 26 errors
Can you Help me with this?
Thank you
Hi,
I am testing the plugin in container. When I run it manually it works like a charm.
telegraf@ba42cee71747:~$ /usr/local/bin/python /usr/local/bin/telegrafbacnet --config /etc/telegrafbacnet/config.toml
bacnet,deviceAddress=10.32.7.25,objectType=analogInput,objectInstanceNumber=36,deviceName=E09_25 presentValue=24.059999465942383 1694499025929842419
bacnet,deviceAddress=10.32.7.25,objectType=analogInput,objectInstanceNumber=36,deviceName=E09_25 presentValue=24.059999465942383 1694499035928126242
However, when I run it from telegraf with the example configuration, it receives TERM signal and nothing is in output. In log there is an error:
2023-09-12T05:38:34Z I! [inputs.execd] Starting process: telegrafbacnet [--config /etc/telegrafbacnet/config.toml]
2023-09-12T05:38:34Z D! [agent] Stopping service inputs
2023-09-12T05:38:39Z E! [inputs.execd] stderr: "===== TERM Signal, 12-Sep-2023 05:38:39"
2023-09-12T05:38:44Z E! [inputs.execd] Error in plugin: error reading stderr: read |0: file already closed
2023-09-12T05:38:44Z E! [inputs.execd] Error in plugin: read |0: file already closed
2023-09-12T05:38:44Z I! [inputs.execd] Process /usr/local/bin/telegrafbacnet shut down
2023-09-12T05:38:44Z D! [agent] Input channel closed
2023-09-12T05:38:44Z D! [agent] Stopped Successfully
2023-09-12T05:38:44Z E! [telegraf] Error running agent: input plugins recorded 3 errors
I tried to change collection interval and restart_delay but without success.
Can you point me in the right direction, what's wrong?
Thanks Jan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.