Skip to content

Commit

Permalink
Add pve_up metric for storage
Browse files Browse the repository at this point in the history
  • Loading branch information
znerol committed Dec 24, 2024
1 parent 8b25542 commit e5d2d11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pve_exporter/collector/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def collect(self): # pylint: disable=missing-docstring
label_values = [resource['id']]
status_metrics.add_metric(label_values, resource['status'] == 'running')

for resource in self._pve.cluster.resources.get(type='storage'):
label_values = [resource['id']]
status_metrics.add_metric(label_values, resource['status'] == 'available')

yield status_metrics


Expand Down

0 comments on commit e5d2d11

Please sign in to comment.