Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions vmware_exporter/vmware_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ def _create_metric_containers(self):
'vmware_vm_template',
'VMWare VM Template (true / false)',
labels=self._labelNames['vms']),

'vmware_vm_storage_committed': GaugeMetricFamily(
'vmware_vm_storage_committed',
'VMWare VM committed storage',
labels=self._labelNames['vms']),

'vmware_vm_storage_uncommitted': GaugeMetricFamily(
'vmware_vm_storage_uncommitted',
'VMWare VM uncommitted storage',
labels=self._labelNames['vms']),
}
metric_list['vmguests'] = {
'vmware_vm_guest_disk_free': GaugeMetricFamily(
Expand Down Expand Up @@ -748,6 +758,8 @@ def vm_inventory(self):
'summary.config.memorySizeMB',
'runtime.maxCpuUsage',
'summary.config.template',
'summary.storage.committed',
'summary.storage.uncommitted',
])

if self.collect_only['vmguests'] is True:
Expand Down Expand Up @@ -1584,6 +1596,12 @@ def _vmware_get_vms(self, metrics):
if 'summary.config.template' in row:
metrics['vmware_vm_template'].add_metric(labels, row['summary.config.template'])

if 'summary.storage.committed' in row:
metrics['vmware_vm_storage_committed'].add_metric(labels, row['summary.storage.committed'])

if 'summary.storage.uncommitted' in row:
metrics['vmware_vm_storage_uncommitted'].add_metric(labels, row['summary.storage.uncommitted'])

if 'guest.disk' in row and len(row['guest.disk']) > 0:
for disk in row['guest.disk']:
metrics['vmware_vm_guest_disk_free'].add_metric(
Expand Down