influxdata / influxdata/telegraf
[inputs.redfish] old redfish schema
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
[[inputs.redfish]]
address = "https://target.example.net"
computer_system_id = "1"
include_metrics = ["power"]
insecure_skip_verify = true
password = "password"
timeout = "5s"
username = "admin"
```
### Logs from Telegraf
```text
[inputs.redfish] Error in plugin: error parsing input: invalid character '<' looking for beginning of value
```
### System info
1.37.1-1, Debian 12.13
### Docker
_No response_
### Steps to reproduce
Supermicro H14DSG-O-CPU with latest Firmware/BIOS uses '#Chassis.v1_25_2.Chassis'. I can't get the data for the power metrics.
```
{
"@odata.type": "#Chassis.v1_25_2.Chassis",
"@odata.id": "/redfish/v1/Chassis/1",
"Id": "1",
"Name": "Computer System Chassis",
"ChassisType": "RackMount",
"Manufacturer": "Supermicro",
"Model": "H14DSG-O-CPU",
"SerialNumber": "",
"PartNumber": "CSE-528G2TS-R000NDP",
"AssetTag": null,
"IndicatorLED": "Off",
"LocationIndicatorActive": false,
"MaxPowerWatts": 16200,
"PowerState": "On",
"Status": {
"State": "Enabled",
"Health": "Critical",
"HealthRollup": "Critical"
},
"PhysicalSecurity": {
"IntrusionSensorNumber": 170,
"IntrusionSensor": "HardwareIntrusion",
"IntrusionSensorReArm": "Manual"
},
"Controls": {
"@odata.id": "/redfish/v1/Chassis/1/Controls"
},
"PCIeDevices": {
"@odata.id": "/redfish/v1/Chassis/1/PCIeDevices"
},
"NetworkAdapters": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters"
},
"PCIeSlots": {
"@odata.id": "/redfish/v1/Chassis/1/PCIeSlots"
},
"Sensors": {
"@odata.id": "/redfish/v1/Chassis/1/Sensors"
},
"Memory": {
"@odata.id": "/redfish/v1/Systems/1/Memory"
},
"PowerSubsystem": {
"@odata.id": "/redfish/v1/Chassis/1/PowerSubsystem"
},
"ThermalSubsystem": {
"@odata.id": "/redfish/v1/Chassis/1/ThermalSubsystem"
},
"EnvironmentMetrics": {
"@odata.id": "/redfish/v1/Chassis/1/EnvironmentMetrics"
},
"Assembly": {
"@odata.id": "/redfish/v1/Chassis/1/Assembly"
},
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/1"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/1"
}
],
"ManagersInChassis": [
{
"@odata.id": "/redfish/v1/Managers/1"
}
]
},
"Oem": {
"Supermicro": {
"@odata.type": "#SmcChassisExtensions.v1_0_0.Chassis",
"BoardSerialNumber": "",
"GUID": "",
"BoardID": "0x1d6c"
}
},
"@odata.etag": "\"70db5c6fcc52ea2ba65664ce317df5d9\""
}
```
If I understand the redfish plugin correct, then it fails because `Power` and `Thermal` are deprecated and it shoud be:
```
"PowerSubsystem": {"@odata.id": "/redfish/v1/Chassis/1/PowerSubsystem"}
"ThermalSubsystem": {"@odata.id": "/redfish/v1/Chassis/1/ThermalSubsystem"}
```
### Expected behavior
Get power and thermal metrics.
### Actual behavior
Error:
```
[inputs.redfish] Error in plugin: error parsing input: invalid character '<' looking for beginning of value
```
and I don't see any metrics via telegraf.
### Additional info
_No response_
Contributor guide
Research direction
Start at the inputs.redfish plugin entry point and inspect how the Power and Thermal resources are requested and parsed. Reproduce with the provided Telegraf configuration and Redfish response, then verify that power and thermal metrics are collected without the JSON parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100