Skip to content

Commit

Permalink
Recreate sdr cache if invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
sudeephb committed Apr 22, 2024
1 parent 6c55a2d commit 34ffb8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion prometheus_hardware_exporter/collectors/ipmi_sel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def get_sel_entries(self, time_range: int) -> Optional[List[Dict[str, str]]]:
Returns:
sel_entries: a list of dictionaries containing sel_sentries, or []
"""
result = self("--output-event-state --interpret-oem-data --entity-sensor-names")
result = self(
"--sdr-cache-recreate --output-event-state --interpret-oem-data --entity-sensor-names"
)
if result.error:
logger.error(result.error)
return None
Expand Down
2 changes: 1 addition & 1 deletion prometheus_hardware_exporter/collectors/ipmimonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_sensor_data(self) -> List[Dict[str, str]]:
Returns:
sensor_data: a list of dictionaries containing sensor data, or []
"""
result = self()
result = self("--sdr-cache-recreate")
if result.error:
logger.error(result.error)
return []
Expand Down

0 comments on commit 34ffb8c

Please sign in to comment.