Update the metrics to use labels instead of individual metric names
This commit is contained in:
parent
d5a422ca10
commit
f10916743c
3
main.py
3
main.py
|
@ -37,8 +37,9 @@ def metrics():
|
|||
for generation in latest_data['data'][0]['generationmix']:
|
||||
ret_data.append(
|
||||
{
|
||||
'key': f'sensor_carbon_generation_{generation["fuel"]}_perc',
|
||||
'key': f'sensor_carbon_generation_perc',
|
||||
'labels': {
|
||||
'fuel': generation['fuel'],
|
||||
'region': latest_data['dnoregion'],
|
||||
},
|
||||
'type': 'gauge',
|
||||
|
|
Loading…
Reference in a new issue