Skip to content

Commit

Permalink
The Zabbix vPoller helper now supports vm.process.get method
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Oct 29, 2014
1 parent 7375036 commit 90c43b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vpoller/helpers/zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 90c43b2

Please sign in to comment.