Skip to content

Instantly share code, notes, and snippets.

@tgerla
Created September 29, 2015 13:51
Show Gist options
  • Select an option

  • Save tgerla/a130489be10e46f66d12 to your computer and use it in GitHub Desktop.

Select an option

Save tgerla/a130489be10e46f66d12 to your computer and use it in GitHub Desktop.

Revisions

  1. tgerla created this gist Sep 29, 2015.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    if self.zabbix_server and self.zabbix_username:
    api = ZabbixAPI(server=self.zabbix_server)
    api.login(user=self.zabbix_username, password=self.zabbix_password)

    if self.options.host:
    data = self.get_host(api, self.options.host)
    print(json.dumps(data, indent=2))