rename labels
This commit is contained in:
@@ -13,15 +13,15 @@ I've createtd this python script to collect Power data to analyse Watts, Volts a
|
|||||||
- Docker support.
|
- Docker support.
|
||||||
|
|
||||||
## Metrics Overview
|
## Metrics Overview
|
||||||
| Metric | Typ | Description |
|
| Metric | Typ | Description |
|
||||||
| ------------------------------------ | --------- | -------------------------------------------------------------- |
|
|---------------------------------|-----------|----------------------------------------------------------------|
|
||||||
| redfish_up | Gauge | Status from host (1 = reachable, 0 = not reachable). |
|
| redfish_up | Gauge | Status from host (1 = reachable, 0 = not reachable). |
|
||||||
| redfish_psu_line_input_voltage_volts | Gauge | Voltages per powersupply (label: host, psu_serial). |
|
| redfish_psu_input_voltage | Gauge | Voltages per powersupply (label: host, psu_serial). |
|
||||||
| redfish_psu_power_input_watts | Gauge | Watts per powersupply (label: host, psu_serial). |
|
| redfish_psu_input_watts | Gauge | Watts per powersupply (label: host, psu_serial). |
|
||||||
| redfish_psu_input_amps | Gauge | Amperes per powersupply (label: host, psu_serial). |
|
| redfish_psu_input_amps | Gauge | Amperes per powersupply (label: host, psu_serial). |
|
||||||
| redfish_system_info | Info | Systeminformation (Vendor, Model, Serial, Redfish Version). |
|
| redfish_system_info | Info | Systeminformation (Vendor, Model, Serial, Redfish Version). |
|
||||||
| redfish_request_latency_seconds | Histogram | Latency (label: host). |
|
| redfish_request_latency_seconds | Histogram | Latency (label: host). |
|
||||||
| redfish_errors_total | Counter | Number of errors per host and error type (label: host, error). |
|
| redfish_errors_total | Counter | Number of errors per host and error type (label: host, error). |
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```
|
```
|
||||||
@@ -163,7 +163,7 @@ This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) f
|
|||||||
Here some Server's that I have successfully testet:
|
Here some Server's that I have successfully testet:
|
||||||
|
|
||||||
| Vendor | Model | Redfish Version |
|
| Vendor | Model | Redfish Version |
|
||||||
| ---------- | -------------------- | --------------- |
|
|------------|----------------------|-----------------|
|
||||||
| Supermicro | AS-5126GS-TNRT2 | 1.21.0 |
|
| Supermicro | AS-5126GS-TNRT2 | 1.21.0 |
|
||||||
| | AS-1124US-TNRP | 1.8.0 |
|
| | AS-1124US-TNRP | 1.8.0 |
|
||||||
| HPE | ProLiant DL380 Gen10 | 1.6.0 |
|
| HPE | ProLiant DL380 Gen10 | 1.6.0 |
|
||||||
|
|||||||
@@ -98,12 +98,12 @@ ERROR_COUNTER = Counter(
|
|||||||
"redfish_errors_total", "Total Redfish errors", ["host", "error"]
|
"redfish_errors_total", "Total Redfish errors", ["host", "error"]
|
||||||
)
|
)
|
||||||
VOLTAGE_GAUGE = Gauge(
|
VOLTAGE_GAUGE = Gauge(
|
||||||
"redfish_psu_line_input_voltage_volts",
|
"redfish_psu_input_voltage_volts",
|
||||||
"Line Input Voltage per PSU",
|
"Line Input Voltage per PSU",
|
||||||
["host", "psu_serial", "group"],
|
["host", "psu_serial", "group"],
|
||||||
)
|
)
|
||||||
WATTS_GAUGE = Gauge(
|
WATTS_GAUGE = Gauge(
|
||||||
"redfish_psu_power_input_watts",
|
"redfish_psu_input_watts",
|
||||||
"Power Input Watts per PSU",
|
"Power Input Watts per PSU",
|
||||||
["host", "psu_serial", "group"],
|
["host", "psu_serial", "group"],
|
||||||
)
|
)
|
||||||
@@ -553,8 +553,14 @@ async def get_system_info(session, host: HostConfig):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
manufacturer = system_data.get("Manufacturer")
|
manufacturer = system_data.get("Manufacturer")
|
||||||
|
if manufacturer is None:
|
||||||
|
manufacturer = "<no data>"
|
||||||
model = system_data.get("Model")
|
model = system_data.get("Model")
|
||||||
|
if model is None:
|
||||||
|
model = "<no data>"
|
||||||
serial_number = system_data.get("SerialNumber")
|
serial_number = system_data.get("SerialNumber")
|
||||||
|
if serial_number is None:
|
||||||
|
serial_number = "<no data>"
|
||||||
|
|
||||||
# Hier könnte ihre Werbung stehen
|
# Hier könnte ihre Werbung stehen
|
||||||
SYSTEM_INFO.labels(host=host.fqdn, group=host.group).info(
|
SYSTEM_INFO.labels(host=host.fqdn, group=host.group).info(
|
||||||
|
|||||||
Reference in New Issue
Block a user