delete vendor in system info
This commit is contained in:
@@ -86,7 +86,7 @@ amps_gauge = Gauge(
|
||||
)
|
||||
# set info metric
|
||||
system_info = Info(
|
||||
"redfish_system_info", "System information (vendor, model, serial, etc.)", ["host"]
|
||||
"redfish_system_info", "System information (model, serial, etc.)", ["host"]
|
||||
)
|
||||
|
||||
|
||||
@@ -283,9 +283,6 @@ async def process_power_supply(
|
||||
):
|
||||
"""Extract metrics from PowerSupply"""
|
||||
serial = psu_data.get("SerialNumber")
|
||||
print("Debug Marco Lucarelli")
|
||||
print(serial)
|
||||
print("Debug Marco Lucarelli")
|
||||
|
||||
if power_resource_type == "PowerSubsystem":
|
||||
# Newer Redfish API: Metrics are an own "Metrics" ressource
|
||||
@@ -440,7 +437,7 @@ async def get_system_info(session, host: HostConfig):
|
||||
)
|
||||
return
|
||||
|
||||
# Get Vendor and Redfish Version
|
||||
# Get Redfish Version
|
||||
root_url = f"https://{host.fqdn}/redfish/v1/"
|
||||
root_data = await fetch_with_retry(session, host, root_url)
|
||||
if not root_data:
|
||||
@@ -448,13 +445,6 @@ async def get_system_info(session, host: HostConfig):
|
||||
return
|
||||
|
||||
redfish_version = root_data.get("RedfishVersion")
|
||||
if not redfish_version:
|
||||
print("Marco Lucarelli: INFO! redfish_version")
|
||||
|
||||
vendor = root_data.get("Vendor")
|
||||
if not vendor:
|
||||
print("Marco Lucarelli: INFO! vendor")
|
||||
|
||||
# Get Manufacturer, Serial and Model
|
||||
systems_url = f"https://{host.fqdn}/redfish/v1/Systems/"
|
||||
systems_data = await fetch_with_retry(session, host, systems_url)
|
||||
@@ -481,7 +471,6 @@ async def get_system_info(session, host: HostConfig):
|
||||
# Hier könnte ihre Werbung stehen
|
||||
system_info.labels(host=host.fqdn).info(
|
||||
{
|
||||
"vendor": vendor,
|
||||
"manufacturer": manufacturer,
|
||||
"model": model,
|
||||
"serial_number": serial_number,
|
||||
@@ -553,7 +542,7 @@ async def run_exporter(config, stop_event):
|
||||
tasks = []
|
||||
for hc in host_objs:
|
||||
tasks.append(get_power_data(session, hc))
|
||||
# tasks.append(get_system_info(session, hc))
|
||||
tasks.append(get_system_info(session, hc))
|
||||
await asyncio.gather(*tasks)
|
||||
await process_request(interval)
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user