zachstence / hwinfo-telegraf-plugin

Gather Windows system hardware information from HWiNFO
MIT License
4 stars 1 forks source link

error: didn't read full shared memory buffer #1

Closed cristihcd closed 1 year ago

cristihcd commented 2 years ago

Hello,

I tried this plugin and it works great on a desktop. When I tried it on a server, I get the error: "didn't read full shared memory buffer".

c:\Program Files\InfluxData\telegraf\plugins>hwinfo-telegraf-plugin.exe
2022/10/18 18:52:25 No config found. Loading default config for plugin hwinfo
{"level":"fatal","time":"2022-10-18T18:52:26+03:00","message":"didn't read full shared memory buffer"}

https://github.com/zachstence/hwinfo-telegraf-plugin/blob/410a8c63e1bde89ec3f1ab265618dd7a5f151f95/plugins/inputs/hwinfo/internal/hwinfo.go#L49

I guess there are many sensors on that server (686 columns in CSV export). Do you have suggestions how to debug this? Thanks.

zachstence commented 1 year ago

Ah, yeah I should be able to resolve this. I made a note in the README that I should be reading the SHMEM header first to determine how much data to read. https://github.com/zachstence/hwinfo-telegraf-plugin/blob/main/README.md#L400

I've been making some other enhancements to the plugin recently, and I'll look into fixing this as well. Sorry for the late response!

zachstence commented 1 year ago

Hi @cristihcd, I just released a new version (v1.2.0) that should resolve this. Can you try it out and let me know how it goes?

cristihcd commented 1 year ago

Hello, Thanks for solving this. It works now!