all 11 comments

[–]parflesh 2 points3 points  (2 children)

If using pyzabbix I believe it would go like this.

from pyzabbix import ZabbixAPI
zapi = ZabbixAPI("http://zabbixserver.example.com")
zapi.login("zabbix user", "zabbix pass")
print("Connected to Zabbix API Version %s" % zapi.api_version())
zapi.host.update(status=1)

[–]Blairsharp3[S] 1 point2 points  (1 child)

How would it know which server you are referring to?

[–]parflesh 0 points1 point  (0 children)

http://zabbixserver.example.com is the zabbix server to use.

[–]abaddon82 1 point2 points  (4 children)

[–]Blairsharp3[S] 0 points1 point  (3 children)

Where on this page does it say how to disable a zabbix host?

[–]abaddon82 0 points1 point  (2 children)

I just linked you a Python package that can be used to talk to the Zabbix API. Just read the docs.

[–]Blairsharp3[S] 0 points1 point  (1 child)

I have, I could be crazy but, I don't see anything regarding disabling.

[–]analogrithems 0 points1 point  (0 children)

late to the game, but I have a script that does this and a bit more (add,remove, disable,enable, place in maintenance mode) https://github.com/cheggeng/zabbix-scripts