From 90c43b20f7e5a7a10dcaff05482cb81181d0127a Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Wed, 29 Oct 2014 17:54:29 +0200 Subject: [PATCH] The Zabbix vPoller helper now supports vm.process.get method --- src/vpoller/helpers/zabbix.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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