influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.67k stars 5.59k forks source link

IPMI Plugin: add support for Windows (IPMIUtil and IPMItool.exe Cygwin) + Bad Command with IPMIUtil #7798

Closed VegethB closed 4 months ago

VegethB commented 4 years ago

Relevant telegraf.conf:

[[inputs.ipmi_sensor]]
  path = "C:\\Program Files\\Sourceforge\\ipmiutil\\ipmiutil.exe" # This is the default install location of ipmitool
  servers = ["USER:PASSWORD@lan(192.168.1.6)"]
  interval = "30s"
  timeout = "20s"
  metric_version = 2 # Usually 1 or 2

Obviously I changed the password and username of that command with the right ones.

System info:

Windows Server 2019 Stable Latest, Telegraf for windows latest stable (2020-09-07), IPMI = iLo2 HP ProLiant DL380 G6 ; IPMI v2.

Steps to reproduce:

  1. Install IPMIUtil (version for windows of IPMITool, tested it works)
  2. Config Telegraf to use IPMI and start from CMD to view console output.

Expected behavior:

Execution of the task using the commands for "IPMIUtil.exe" since it is the only free and similar official alternative to IPMITools for Windows.

Actual behavior:

image Rightly use the command for linux IPMITool Instead of giving the possibility to use a custom command through an overide option that can be enabled.

Additional info:

I spent 2 days building IPMITool for Windows via Cygwin. The output .exe version seems to work but only from an external pc (not the pc itself where IPMI resides) for this reason I ask to add the compatibility with IPMIUtil which works even if run by the host itself: IPMITool.exe on host = image (I want to re-specify that this error occurs only if IPMITool.exe is run on the same machine where IPMI / iLo2 resides)

IPMIUtil.exe on host = image It is not the command I want to use but it is an example. The end result is to get all the statistics (such as the current consumed by each device or fan status or hdd states etc.)

http://ipmiutil.sourceforge.net/man.htm

VegethB commented 4 years ago

@danielnelson Updated Comments with more info 👍😵.

danielnelson commented 4 years ago

I tried to run IPMIUtil outside of Telegraf, but on my system it is not working. After installing it complains that libeay32.dll is missing and if provided with a copy I get an error that the executable cannot be started properly.

I think the best way to proceed would probably be to add a wrapper script to run this from the exec input.

VegethB commented 4 years ago

I use Libeay32.dll from this version of openssl: openssl-1.0.0k-x64_86-win64.zip

sspaink commented 2 years ago

@VegethB were you able to get this working using the exec input plugin?

VegethB commented 2 years ago

@sspaink Ok, I contacted the programmer of "IPMIUtils" and he told me that the output with the parameter "-c" is a CSV with delimiter '|' (because ',' gave problems on some values). Now, I tried to configure the data source as CSV but it is not working (I think the rows, columns and header are not clear to me or worse, the output is reverse).

Output (console): ![image](https://user-images.githubusercontent.com/17975351/198125345-3082b07e-5422-42e0-a576-77916f89c880.png) ![image](https://user-images.githubusercontent.com/17975351/198126277-7749ad7a-1944-4bed-8eca-b5842eabb743.png)

On grafana it gives me the names of the headers (3rd line) but not the values, probably the configuration is wrong.

image

The result would be: Name> Power Supply 1 Status> 35.00W So I'll just need the last 3 columns.

2nd problem, if I set the columns to skip (like 4 col. to skip), Telegraf crashes. If I don't set them up, it works.

powersj commented 5 months ago

@VegethB were you able to get this working?

VegethB commented 4 months ago

@VegethB were you able to get this working?

Unfortunately, for work I had to move, so the server has been down for years now. At the moment, I remember setting Grafana and the whole ecosystem aside a few weeks after my last response in 2022. It is definitely my intention to resume this issue but it will be discussed in late summer or current summer.

However, I seem to remember that it also worked with 'exec' but gave problems with the csv output.

powersj commented 4 months ago

However, I seem to remember that it also worked with 'exec' but gave problems with the csv output.

If you could provide the CSV output in a non-screenshot we could help you parse it.

I don't really see us modifying the current plugin to parse a new format, so I'd prefer to help you get the CSV output working via the exec plugin.

telegraf-tiger[bot] commented 4 months ago

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!