Skip to content

Commit

Permalink
Update exporter.go to include use of firmware.modules-exclude flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferKaiser21 authored Jul 5, 2024
1 parent 6358911 commit 173294e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"net"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -426,7 +427,13 @@ func NewExporter(ctx context.Context, target, uri, profile, model string, exclud

// Firmware Inventory
for _, url := range firmwareInventoryEndpoints {
tasks = append(tasks, pool.NewTask(common.Fetch(exp.url+url, target, profile, retryClient), exp.url+url, handle(&exp, FIRMWAREINVENTORY)))
// this list can potentially be large and cause scrapes to take a long time please
// see the '--collector.firmware.modules-exclude' config in the README for more information
if reg, ok := excludes["firmware"]; ok {
if !reg.(*regexp.Regexp).MatchString(url) {
tasks = append(tasks, pool.NewTask(common.Fetch(exp.url+url, target, profile, retryClient), exp.url+url, handle(&exp, FIRMWAREINVENTORY)))
}
}
}

// call /redfish/v1/Managers/XXX/ for firmware version and ilo self test metrics
Expand Down

0 comments on commit 173294e

Please sign in to comment.