Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redfish plugin for hardware monitoring #7082

Merged
merged 12 commits into from
Jun 18, 2020
1 change: 1 addition & 0 deletions plugins/inputs/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ import (
_ "github.com/influxdata/telegraf/plugins/inputs/puppetagent"
_ "github.com/influxdata/telegraf/plugins/inputs/rabbitmq"
_ "github.com/influxdata/telegraf/plugins/inputs/raindrops"
_ "github.com/influxdata/telegraf/plugins/inputs/redfish"
_ "github.com/influxdata/telegraf/plugins/inputs/redis"
_ "github.com/influxdata/telegraf/plugins/inputs/rethinkdb"
_ "github.com/influxdata/telegraf/plugins/inputs/riak"
Expand Down
165 changes: 165 additions & 0 deletions plugins/inputs/redfish/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Redfish Input Plugin

The `redfish` plugin gathers metrics and status information about CPU temperature, fanspeed, Powersupply, voltage, hostname and Location details(datacenter,placement,rack and room) of Dell hardware servers for which redfish is enabled.
And also metrics like CPU temperature,fanspeed, Powersupply and hostname metrics for HP Hardware server(redfish should be enabled).

Note: Currently this plugin only supports DELL and HP servers.



### Configuration

```toml
[[inputs.redfish]]
## Server OOB-IP
host = "http://192.0.0.1"

## Username,Password for hardware server
basicauthusername = "test"
basicauthpassword = "test"
danielnelson marked this conversation as resolved.
Show resolved Hide resolved
## Server Vendor(dell or hp)
server= "dell"
danielnelson marked this conversation as resolved.
Show resolved Hide resolved
## Resource Id for redfish APIs
id="System.Embedded.1"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false

## Amount of time allowed to complete the HTTP request
# timeout = "5s"
```

### Metrics for Dell Servers

- cpu_temperatures
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W should name these redfish_thermal, redfish_power which will fit in well with the output of other plugins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The produced data model doesn't align very closely with what I see in the Redfish specification, I'd like to mirror the types as I think this will make it easier to extend to new types and understand for users familiar with Redfish. The most straightforward way to me seems to be to one metric for each supported resource type. For example we could have one type for Thermal, one for Power.

We have two type data coming from each resource(thermal,power) , if we send all the data from each resource to a single measurement it would be a problem as in the thermal resource the number of fans and CPUs temperature varies, for example there might be 50 CPUs but only 7 Fans, Similar for Power resource as well. It would be appropriate to store them in different measurements like redfish_thermal_temperatures, redfish_thermal_fans,redfish_power_powersupplies, redfish_power_voltages. What would you think of it?

- tags:
- hostname
- name
- oob_ip
- host
danielnelson marked this conversation as resolved.
Show resolved Hide resolved
- Fields:
- datacenter
- temperature
- health
- rack
- room
- row
- state
danielnelson marked this conversation as resolved.
Show resolved Hide resolved

- fans
- tags:
- hostname
- name
- oob_ip
- host
- Fields:
- datacenter
- fanspeed
- health
- rack
- room
- row
- state

- voltages
- tags:
- hostname
- name
- oob_ip
- host
- Fields:
- datacenter
- voltage
- health
- rack
- room
- row
- state

- Powersupply
- tags:
- hostname
- name
- oobip
- host
- Fields:
- datacenter
- health
- power_capacity_watts
- power_input_watts
- power_output_watts
- rack
- room
- row
- state

### Metrics for HP Servers

- cpu_temperature
- tags:
- hostname
- name
- oob_ip
- host
- Fields:
- temperature
- health
- state

- fans
- tags:
- hostname
- name
- oob_ip
- host
- Fields:
- fanspeed
- health
- state
- Powersupply
- tags:
- hostname
- name
- oob_ip
- host
- member_id
- Fields:
- power_capacity_watts
- last_powerOutput_watts
- line_input_voltage

### Example Output For HP
```
cpu_temperature,hostname=tpa_hostname,name=01-Inlet\ Ambient,oob_ip=http://127.0.0.1,host=tpa_po health="OK",state="Enabled",temperature="19" 1582612210000000000
cpu_temperature,hostname=tpa_hostname,name=02-CPU\ 1,oob_ip=http://127.0.0.1,host=tpa_po health="OK",state="Enabled",temperature="40" 1582612210000000000
fans,hostname=tpa_hostname,name=Fan\ 4,oob_ip=http://127.0.0.1,host=tpa_po fanspeed="23",health="OK",state="Enabled" 1582612210000000000
fans,hostname=tpa_hostname,name=Fan\ 5,oob_ip=http://127.0.0.1,host=tpa_po fanspeed="23",health="OK",state="Enabled" 1582612210000000000
fans,hostname=tpa_hostname,name=Fan\ 6,oob_ip=http://127.0.0.1,host=tpa_po fanspeed="23",health="OK",state="Enabled" 1582612210000000000
fans,hostname=tpa_hostname,name=Fan\ 7,oob_ip=http://127.0.0.1,host=tpa_po fanspeed="23",health="OK",state="Enabled" 1582612210000000000
powersupply,hostname=tpa_hostname,member_id=0,name=HpeServerPowerSupply,oob_ip=http://127.0.0.1,host=tpa_po last_power_output_watts="109",line_input_voltage="206",power_capacity_watts="800" 1582612210000000000
powersupply,hostname=tpa_hostname,member_id=1,name=HpeServerPowerSupply,oob_ip=http://127.0.0.1,host=tpa_po last_power_output_watts="98",line_input_voltage="204",power_capacity_watts="800" 1582612210000000000

```

### Example Output For Dell
```
cpu_temperature,hostname=test-hostname,name=CPU1\ Temp,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",temperature="41" 1582114112000000000
cpu_temperature,hostname=test-hostname,name=CPU2\ Temp,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",temperature="51" 1582114112000000000
cpu_temperature,hostname=test-hostname,name=System\ Board\ Inlet\ Temp,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",temperature="23" 1582114112000000000
cpu_temperature,hostname=test-hostname,name=System\ Board\ Exhaust\ Temp,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",temperature="33" 1582114112000000000
fans,hostname=test-hostname,name=System\ Board\ Fan1A,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",fanspeed="17760",health="OK",rack="12",room="tbc",row="3",state="Enabled" 1582114112000000000
fans,hostname=test-hostname,name=System\ Board\ Fan1B,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",fanspeed="15360",health="OK",rack="12",room="tbc",row="3",state="Enabled" 1582114112000000000
fans,hostname=test-hostname,name=System\ Board\ Fan2A,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",fanspeed="17880",health="OK",rack="12",room="tbc",row="3",state="Enabled" 1582114112000000000
powersupply,hostname=test-hostname,name=PS1\ Status,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",power_capacity_watts="750",power_input_watts="900",power_output_watts="208",rack="12",room="tbc",row="3",state="Enabled" 1582114112000000000
powersupply,hostname=test-hostname,name=PS2\ Status,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",power_capacity_watts="750",power_input_watts="900",power_output_watts="194",rack="12",room="tbc",row="3",state="Enabled" 1582114112000000000
voltages,hostname=test-hostname,name=CPU1\ MEM345\ VDDQ\ PG,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",voltage="1" 1582114112000000000
voltages,hostname=test-hostname,name=CPU1\ MEM345\ VPP\ PG,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",voltage="1" 1582114112000000000
voltages,hostname=test-hostname,name=CPU1\ MEM345\ VTT\ PG,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",voltage="1" 1582114112000000000
voltages,hostname=test-hostname,name=PS1\ voltage\ 1,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",Voltage="208" 1582114112000000000
voltages,hostname=test-hostname,name=PS2\ voltage\ 2,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",Voltage="208" 1582114112000000000
voltages,hostname=test-hostname,name=System\ Board\ 3.3V\ A\ PG,oob_ip=http://190.0.0.1,host=test-telegraf datacenter="Tampa",health="OK",rack="12",room="tbc",row="3",state="Enabled",voltage="1" 1582114112000000000

```
Loading