feat(inputs.redfish): Allow specifying with metrics to collect (#14143)
This commit is contained in:
parent
37ef23fb7f
commit
43ec383fc6
|
|
@ -31,6 +31,10 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## System Id to collect data for in Redfish APIs.
|
## System Id to collect data for in Redfish APIs.
|
||||||
computer_system_id="System.Embedded.1"
|
computer_system_id="System.Embedded.1"
|
||||||
|
|
||||||
|
## Metrics to collect
|
||||||
|
## The metric collects to gather. Choose from "power" and "thermal".
|
||||||
|
# include_metrics = ["power", "thermal"]
|
||||||
|
|
||||||
## Tag sets allow you to include redfish OData link parent data
|
## Tag sets allow you to include redfish OData link parent data
|
||||||
## For Example.
|
## For Example.
|
||||||
## Thermal data is an OData link with parent Chassis which has a link of Location.
|
## Thermal data is an OData link with parent Chassis which has a link of Location.
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ type Redfish struct {
|
||||||
Username string `toml:"username"`
|
Username string `toml:"username"`
|
||||||
Password string `toml:"password"`
|
Password string `toml:"password"`
|
||||||
ComputerSystemID string `toml:"computer_system_id"`
|
ComputerSystemID string `toml:"computer_system_id"`
|
||||||
|
IncludeMetrics []string `toml:"include_metrics"`
|
||||||
IncludeTagSets []string `toml:"include_tag_sets"`
|
IncludeTagSets []string `toml:"include_tag_sets"`
|
||||||
Timeout config.Duration `toml:"timeout"`
|
Timeout config.Duration `toml:"timeout"`
|
||||||
|
|
||||||
|
|
@ -163,6 +164,17 @@ func (r *Redfish) Init() error {
|
||||||
return fmt.Errorf("did not provide the computer system ID of the resource")
|
return fmt.Errorf("did not provide the computer system ID of the resource")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(r.IncludeMetrics) == 0 {
|
||||||
|
return fmt.Errorf("no metrics specified to collect")
|
||||||
|
}
|
||||||
|
for _, metric := range r.IncludeMetrics {
|
||||||
|
switch metric {
|
||||||
|
case "thermal", "power":
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("unknown metric requested: %s", metric)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
r.tagSet = make(map[string]bool, len(r.IncludeTagSets))
|
r.tagSet = make(map[string]bool, len(r.IncludeTagSets))
|
||||||
for _, setLabel := range r.IncludeTagSets {
|
for _, setLabel := range r.IncludeTagSets {
|
||||||
r.tagSet[setLabel] = true
|
r.tagSet[setLabel] = true
|
||||||
|
|
@ -295,159 +307,181 @@ func (r *Redfish) Gather(acc telegraf.Accumulator) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
thermal, err := r.getThermal(chassis.Thermal.Ref)
|
for _, metric := range r.IncludeMetrics {
|
||||||
if err != nil {
|
var err error
|
||||||
return err
|
switch metric {
|
||||||
|
case "thermal":
|
||||||
|
err = r.gatherThermal(acc, address, system, chassis)
|
||||||
|
case "power":
|
||||||
|
err = r.gatherPower(acc, address, system, chassis)
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("unknown metric requested: %s", metric)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Redfish) gatherThermal(acc telegraf.Accumulator, address string, system *System, chassis *Chassis) error {
|
||||||
|
thermal, err := r.getThermal(chassis.Thermal.Ref)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, j := range thermal.Temperatures {
|
||||||
|
tags := map[string]string{}
|
||||||
|
tags["member_id"] = j.MemberID
|
||||||
|
tags["address"] = address
|
||||||
|
tags["name"] = j.Name
|
||||||
|
tags["source"] = system.Hostname
|
||||||
|
tags["state"] = j.Status.State
|
||||||
|
tags["health"] = j.Status.Health
|
||||||
|
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
||||||
|
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
||||||
|
tags["room"] = chassis.Location.PostalAddress.Room
|
||||||
|
tags["rack"] = chassis.Location.Placement.Rack
|
||||||
|
tags["row"] = chassis.Location.Placement.Row
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassis]; ok {
|
||||||
|
setChassisTags(chassis, tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, j := range thermal.Temperatures {
|
fields := make(map[string]interface{})
|
||||||
tags := map[string]string{}
|
fields["reading_celsius"] = j.ReadingCelsius
|
||||||
tags["member_id"] = j.MemberID
|
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
||||||
tags["address"] = address
|
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
||||||
tags["name"] = j.Name
|
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
||||||
tags["source"] = system.Hostname
|
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
||||||
tags["state"] = j.Status.State
|
acc.AddFields("redfish_thermal_temperatures", fields, tags)
|
||||||
tags["health"] = j.Status.Health
|
}
|
||||||
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
|
||||||
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
|
||||||
tags["room"] = chassis.Location.PostalAddress.Room
|
|
||||||
tags["rack"] = chassis.Location.Placement.Rack
|
|
||||||
tags["row"] = chassis.Location.Placement.Row
|
|
||||||
}
|
|
||||||
if _, ok := r.tagSet[tagSetChassis]; ok {
|
|
||||||
setChassisTags(chassis, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
fields := make(map[string]interface{})
|
for _, j := range thermal.Fans {
|
||||||
fields["reading_celsius"] = j.ReadingCelsius
|
tags := map[string]string{}
|
||||||
|
fields := make(map[string]interface{})
|
||||||
|
tags["member_id"] = j.MemberID
|
||||||
|
tags["address"] = address
|
||||||
|
tags["name"] = j.Name
|
||||||
|
tags["source"] = system.Hostname
|
||||||
|
tags["state"] = j.Status.State
|
||||||
|
tags["health"] = j.Status.Health
|
||||||
|
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
||||||
|
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
||||||
|
tags["room"] = chassis.Location.PostalAddress.Room
|
||||||
|
tags["rack"] = chassis.Location.Placement.Rack
|
||||||
|
tags["row"] = chassis.Location.Placement.Row
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassis]; ok {
|
||||||
|
setChassisTags(chassis, tags)
|
||||||
|
}
|
||||||
|
|
||||||
|
if j.ReadingUnits != nil && *j.ReadingUnits == "RPM" {
|
||||||
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
||||||
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
||||||
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
||||||
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
||||||
acc.AddFields("redfish_thermal_temperatures", fields, tags)
|
fields["reading_rpm"] = j.Reading
|
||||||
|
} else {
|
||||||
|
fields["reading_percent"] = j.Reading
|
||||||
|
}
|
||||||
|
acc.AddFields("redfish_thermal_fans", fields, tags)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Redfish) gatherPower(acc telegraf.Accumulator, address string, system *System, chassis *Chassis) error {
|
||||||
|
power, err := r.getPower(chassis.Power.Ref)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, j := range power.PowerControl {
|
||||||
|
tags := map[string]string{
|
||||||
|
"member_id": j.MemberID,
|
||||||
|
"address": address,
|
||||||
|
"name": j.Name,
|
||||||
|
"source": system.Hostname,
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
||||||
|
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
||||||
|
tags["room"] = chassis.Location.PostalAddress.Room
|
||||||
|
tags["rack"] = chassis.Location.Placement.Rack
|
||||||
|
tags["row"] = chassis.Location.Placement.Row
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassis]; ok {
|
||||||
|
setChassisTags(chassis, tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, j := range thermal.Fans {
|
fields := map[string]interface{}{
|
||||||
tags := map[string]string{}
|
"power_allocated_watts": j.PowerAllocatedWatts,
|
||||||
fields := make(map[string]interface{})
|
"power_available_watts": j.PowerAvailableWatts,
|
||||||
tags["member_id"] = j.MemberID
|
"power_capacity_watts": j.PowerCapacityWatts,
|
||||||
tags["address"] = address
|
"power_consumed_watts": j.PowerConsumedWatts,
|
||||||
tags["name"] = j.Name
|
"power_requested_watts": j.PowerRequestedWatts,
|
||||||
tags["source"] = system.Hostname
|
"average_consumed_watts": j.PowerMetrics.AverageConsumedWatts,
|
||||||
tags["state"] = j.Status.State
|
"interval_in_min": j.PowerMetrics.IntervalInMin,
|
||||||
tags["health"] = j.Status.Health
|
"max_consumed_watts": j.PowerMetrics.MaxConsumedWatts,
|
||||||
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
"min_consumed_watts": j.PowerMetrics.MinConsumedWatts,
|
||||||
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
|
||||||
tags["room"] = chassis.Location.PostalAddress.Room
|
|
||||||
tags["rack"] = chassis.Location.Placement.Rack
|
|
||||||
tags["row"] = chassis.Location.Placement.Row
|
|
||||||
}
|
|
||||||
if _, ok := r.tagSet[tagSetChassis]; ok {
|
|
||||||
setChassisTags(chassis, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if j.ReadingUnits != nil && *j.ReadingUnits == "RPM" {
|
|
||||||
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
|
||||||
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
|
||||||
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
|
||||||
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
|
||||||
fields["reading_rpm"] = j.Reading
|
|
||||||
} else {
|
|
||||||
fields["reading_percent"] = j.Reading
|
|
||||||
}
|
|
||||||
acc.AddFields("redfish_thermal_fans", fields, tags)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
power, err := r.getPower(chassis.Power.Ref)
|
acc.AddFields("redfish_power_powercontrol", fields, tags)
|
||||||
if err != nil {
|
}
|
||||||
return err
|
|
||||||
|
for _, j := range power.PowerSupplies {
|
||||||
|
tags := map[string]string{}
|
||||||
|
tags["member_id"] = j.MemberID
|
||||||
|
tags["address"] = address
|
||||||
|
tags["name"] = j.Name
|
||||||
|
tags["source"] = system.Hostname
|
||||||
|
tags["state"] = j.Status.State
|
||||||
|
tags["health"] = j.Status.Health
|
||||||
|
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
||||||
|
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
||||||
|
tags["room"] = chassis.Location.PostalAddress.Room
|
||||||
|
tags["rack"] = chassis.Location.Placement.Rack
|
||||||
|
tags["row"] = chassis.Location.Placement.Row
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassis]; ok {
|
||||||
|
setChassisTags(chassis, tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, j := range power.PowerControl {
|
fields := make(map[string]interface{})
|
||||||
tags := map[string]string{
|
fields["power_input_watts"] = j.PowerInputWatts
|
||||||
"member_id": j.MemberID,
|
fields["power_output_watts"] = j.PowerOutputWatts
|
||||||
"address": address,
|
fields["line_input_voltage"] = j.LineInputVoltage
|
||||||
"name": j.Name,
|
fields["last_power_output_watts"] = j.LastPowerOutputWatts
|
||||||
"source": system.Hostname,
|
fields["power_capacity_watts"] = j.PowerCapacityWatts
|
||||||
}
|
acc.AddFields("redfish_power_powersupplies", fields, tags)
|
||||||
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
}
|
||||||
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
|
||||||
tags["room"] = chassis.Location.PostalAddress.Room
|
|
||||||
tags["rack"] = chassis.Location.Placement.Rack
|
|
||||||
tags["row"] = chassis.Location.Placement.Row
|
|
||||||
}
|
|
||||||
if _, ok := r.tagSet[tagSetChassis]; ok {
|
|
||||||
setChassisTags(chassis, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
for _, j := range power.Voltages {
|
||||||
"power_allocated_watts": j.PowerAllocatedWatts,
|
tags := map[string]string{}
|
||||||
"power_available_watts": j.PowerAvailableWatts,
|
tags["member_id"] = j.MemberID
|
||||||
"power_capacity_watts": j.PowerCapacityWatts,
|
tags["address"] = address
|
||||||
"power_consumed_watts": j.PowerConsumedWatts,
|
tags["name"] = j.Name
|
||||||
"power_requested_watts": j.PowerRequestedWatts,
|
tags["source"] = system.Hostname
|
||||||
"average_consumed_watts": j.PowerMetrics.AverageConsumedWatts,
|
tags["state"] = j.Status.State
|
||||||
"interval_in_min": j.PowerMetrics.IntervalInMin,
|
tags["health"] = j.Status.Health
|
||||||
"max_consumed_watts": j.PowerMetrics.MaxConsumedWatts,
|
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
||||||
"min_consumed_watts": j.PowerMetrics.MinConsumedWatts,
|
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
||||||
}
|
tags["room"] = chassis.Location.PostalAddress.Room
|
||||||
|
tags["rack"] = chassis.Location.Placement.Rack
|
||||||
acc.AddFields("redfish_power_powercontrol", fields, tags)
|
tags["row"] = chassis.Location.Placement.Row
|
||||||
|
}
|
||||||
|
if _, ok := r.tagSet[tagSetChassis]; ok {
|
||||||
|
setChassisTags(chassis, tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, j := range power.PowerSupplies {
|
fields := make(map[string]interface{})
|
||||||
tags := map[string]string{}
|
fields["reading_volts"] = j.ReadingVolts
|
||||||
tags["member_id"] = j.MemberID
|
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
||||||
tags["address"] = address
|
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
||||||
tags["name"] = j.Name
|
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
||||||
tags["source"] = system.Hostname
|
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
||||||
tags["state"] = j.Status.State
|
acc.AddFields("redfish_power_voltages", fields, tags)
|
||||||
tags["health"] = j.Status.Health
|
|
||||||
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
|
||||||
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
|
||||||
tags["room"] = chassis.Location.PostalAddress.Room
|
|
||||||
tags["rack"] = chassis.Location.Placement.Rack
|
|
||||||
tags["row"] = chassis.Location.Placement.Row
|
|
||||||
}
|
|
||||||
if _, ok := r.tagSet[tagSetChassis]; ok {
|
|
||||||
setChassisTags(chassis, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
fields := make(map[string]interface{})
|
|
||||||
fields["power_input_watts"] = j.PowerInputWatts
|
|
||||||
fields["power_output_watts"] = j.PowerOutputWatts
|
|
||||||
fields["line_input_voltage"] = j.LineInputVoltage
|
|
||||||
fields["last_power_output_watts"] = j.LastPowerOutputWatts
|
|
||||||
fields["power_capacity_watts"] = j.PowerCapacityWatts
|
|
||||||
acc.AddFields("redfish_power_powersupplies", fields, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, j := range power.Voltages {
|
|
||||||
tags := map[string]string{}
|
|
||||||
tags["member_id"] = j.MemberID
|
|
||||||
tags["address"] = address
|
|
||||||
tags["name"] = j.Name
|
|
||||||
tags["source"] = system.Hostname
|
|
||||||
tags["state"] = j.Status.State
|
|
||||||
tags["health"] = j.Status.Health
|
|
||||||
if _, ok := r.tagSet[tagSetChassisLocation]; ok && chassis.Location != nil {
|
|
||||||
tags["datacenter"] = chassis.Location.PostalAddress.DataCenter
|
|
||||||
tags["room"] = chassis.Location.PostalAddress.Room
|
|
||||||
tags["rack"] = chassis.Location.Placement.Rack
|
|
||||||
tags["row"] = chassis.Location.Placement.Row
|
|
||||||
}
|
|
||||||
if _, ok := r.tagSet[tagSetChassis]; ok {
|
|
||||||
setChassisTags(chassis, tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
fields := make(map[string]interface{})
|
|
||||||
fields["reading_volts"] = j.ReadingVolts
|
|
||||||
fields["upper_threshold_critical"] = j.UpperThresholdCritical
|
|
||||||
fields["upper_threshold_fatal"] = j.UpperThresholdFatal
|
|
||||||
fields["lower_threshold_critical"] = j.LowerThresholdCritical
|
|
||||||
fields["lower_threshold_fatal"] = j.LowerThresholdFatal
|
|
||||||
acc.AddFields("redfish_power_voltages", fields, tags)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -458,6 +492,7 @@ func init() {
|
||||||
return &Redfish{
|
return &Redfish{
|
||||||
// default tag set of chassis.location required for backwards compatibility
|
// default tag set of chassis.location required for backwards compatibility
|
||||||
IncludeTagSets: []string{tagSetChassisLocation},
|
IncludeTagSets: []string{tagSetChassisLocation},
|
||||||
|
IncludeMetrics: []string{"power", "thermal"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@ func TestDellApis(t *testing.T) {
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "System.Embedded.1",
|
ComputerSystemID: "System.Embedded.1",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
require.NoError(t, plugin.Init())
|
require.NoError(t, plugin.Init())
|
||||||
var acc testutil.Accumulator
|
var acc testutil.Accumulator
|
||||||
|
|
@ -603,6 +604,7 @@ func TestHPApis(t *testing.T) {
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "1",
|
ComputerSystemID: "1",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
require.NoError(t, hpPlugin.Init())
|
require.NoError(t, hpPlugin.Init())
|
||||||
var hpAcc testutil.Accumulator
|
var hpAcc testutil.Accumulator
|
||||||
|
|
@ -643,6 +645,7 @@ func TestInvalidUsernameorPassword(t *testing.T) {
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "System.Embedded.1",
|
ComputerSystemID: "System.Embedded.1",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
|
|
||||||
var acc testutil.Accumulator
|
var acc testutil.Accumulator
|
||||||
|
|
@ -671,6 +674,7 @@ func TestNoUsernameorPasswordConfiguration(t *testing.T) {
|
||||||
r := &Redfish{
|
r := &Redfish{
|
||||||
Address: ts.URL,
|
Address: ts.URL,
|
||||||
ComputerSystemID: "System.Embedded.1",
|
ComputerSystemID: "System.Embedded.1",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
|
|
||||||
err := r.Init()
|
err := r.Init()
|
||||||
|
|
@ -743,6 +747,7 @@ func TestInvalidDellJSON(t *testing.T) {
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "System.Embedded.1",
|
ComputerSystemID: "System.Embedded.1",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
|
|
||||||
require.NoError(t, plugin.Init())
|
require.NoError(t, plugin.Init())
|
||||||
|
|
@ -813,6 +818,7 @@ func TestInvalidHPJSON(t *testing.T) {
|
||||||
Username: "test",
|
Username: "test",
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "System.Embedded.2",
|
ComputerSystemID: "System.Embedded.2",
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
|
|
||||||
require.NoError(t, plugin.Init())
|
require.NoError(t, plugin.Init())
|
||||||
|
|
@ -1097,6 +1103,7 @@ func TestIncludeTagSetsConfiguration(t *testing.T) {
|
||||||
Password: "test",
|
Password: "test",
|
||||||
ComputerSystemID: "1",
|
ComputerSystemID: "1",
|
||||||
IncludeTagSets: []string{"chassis", "chassis.location"},
|
IncludeTagSets: []string{"chassis", "chassis.location"},
|
||||||
|
IncludeMetrics: []string{"thermal", "power"},
|
||||||
}
|
}
|
||||||
require.NoError(t, hpPlugin.Init())
|
require.NoError(t, hpPlugin.Init())
|
||||||
var hpAcc testutil.Accumulator
|
var hpAcc testutil.Accumulator
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
## System Id to collect data for in Redfish APIs.
|
## System Id to collect data for in Redfish APIs.
|
||||||
computer_system_id="System.Embedded.1"
|
computer_system_id="System.Embedded.1"
|
||||||
|
|
||||||
|
## Metrics to collect
|
||||||
|
## The metric collects to gather. Choose from "power" and "thermal".
|
||||||
|
# include_metrics = ["power", "thermal"]
|
||||||
|
|
||||||
## Tag sets allow you to include redfish OData link parent data
|
## Tag sets allow you to include redfish OData link parent data
|
||||||
## For Example.
|
## For Example.
|
||||||
## Thermal data is an OData link with parent Chassis which has a link of Location.
|
## Thermal data is an OData link with parent Chassis which has a link of Location.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue