Guest User

Untitled

a guest
Mar 9th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/lib/python
  2.  
  3. from pyzabbix import ZabbixAPI
  4.  
  5.  
  6. lista = []
  7. zapi = ZabbixAPI(url='URL', user='USER', password='PASSWORD')
  8.  
  9. hosts = zapi.host.get(output=['name','hostid'])
  10. for items in zapi.item.get(output=['name','hostid'],filter={'state':'1'}):
  11. for notsupported in hosts:
  12. if notsupported['hostid'] == items['hostid']:
  13. print notsupported['name'] + " " + items['name']
  14. continue
Add Comment
Please, Sign In to add comment