influxdata / telegraf

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

[Feature Request] ipmitool dcmi power reading #1566

Closed virtuallynathan closed 4 months ago

virtuallynathan commented 8 years ago

Feature Request

Add support for parsing ' ipmitool dcmi power reading'

Proposal:

add support for parsing ipmitool dcmi power reading in the IPMI plugin

Current behavior:

ipmitool dcmi power reading is not parsed or reported

Desired behavior:

parse and report ipmitool dcmi power reading

Use case:

gather server power usage from the server its self

Example output:

Instantaneous power reading:                   167 Watts
Minimum during sampling period:                124 Watts
Maximum during sampling period:                422 Watts
Average power reading over sample period:      156 Watts
IPMI timestamp:                           Mon Aug  1 21:22:51 2016
Sampling period:                          00699043 Seconds.
Power reading state is:                   activated
victorhooi commented 4 years ago

I would love to see this as well!

Any word on if this is on the roadmap?

danielnelson commented 4 years ago

It's not on the roadmap right now, but we would accept a pull request or you could do this with the exec input.

brainrecall commented 3 years ago

I would love to have this as well, as my system does not report power usage on the standard "sdr" output.

psxde commented 1 year ago

I have used the exec input to parse dcmi output from supermicro server:

[[inputs.exec]]
  timeout = "5s"
  data_format = "influx"
  environment = [
    "server=x.x.x.x",
    "username=admin",
    "password=password",
    "interface=lan"
  ]
  commands = ['/bin/bash -c "ipmitool -I $interface -H $server -U $username -P $password -c dcmi power reading | grep -Po \"(\d+)(?=\sWatts)\" -m1 | sed \"s/.*/ipmi_sensor,server=${server},name=psu_power,unit=watts value=&/\""']
powersj commented 5 months ago

Hi,

Can one of you grab one of the artifacts from this PR: https://github.com/influxdata/telegraf/pull/15495#issuecomment-2163590839

You will need to update your IPMI sensor plugin config as follows:

[[inputs.ipmi_sensor]]
  sensors = ["sdr", "dcmi_power_reading"]

And let me know if that provides the new metrics?

Thanks