Git Product home page Git Product logo

telegraf-bacnet's People

Contributors

jurajmarcin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

krepsjan hvdort

telegraf-bacnet's Issues

Test config via telegraf

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

Keep getting "Error in plugin: read |0: file already closed"

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.