diff --git a/src/vpoller/helpers/zabbix.py b/src/vpoller/helpers/zabbix.py index 95eccc3..a21b7a2 100644 --- a/src/vpoller/helpers/zabbix.py +++ b/src/vpoller/helpers/zabbix.py @@ -71,6 +71,7 @@ def __init__(self, msg, data): 'vm.disk.discover': self.zabbix_vm_disk_discover, 'vm.disk.get': self.zabbix_vm_disk_get, 'vm.host.get': self.zabbix_item_value, + 'vm.process.get': self.zabbix_vm_process_get, 'vm.cpu.usage.percent': self.zabbix_item_value, 'datastore.discover': self.zabbix_lld_data, 'datastore.get': self.zabbix_item_value, @@ -190,6 +191,13 @@ def zabbix_vm_disk_discover(self): return {'data': data} + def zabbix_vm_process_get(self): + """ + Returns the number of processes in a Virtual Machine + + """ + return len(self.data['result']) + def zabbix_lld_data(self): """ Translates a discovery request to Zabbix LLD format