I read https://www.zabbix.com/documentation...ence/graph/get and other APIs documents related to graphs or triggers and history, and also read https://stackoverflow.com/questions/...ith-zabbix-api to see if I can check the network traffic of different hosts and switches, but they couldn't help me.
Would you please how can I check different things in network monitoring via the API?
If matters, I use python for this, but I think knowing what to call and how to call would work even if the answer is for another language.
This is my python code:
Would you please how can I check different things in network monitoring via the API?
If matters, I use python for this, but I think knowing what to call and how to call would work even if the answer is for another language.
This is my python code:
Code:
import requests
url = 'https://zabbix.mysite.com/api_jsonrpc.php'
zabbix_items_authentication = {'jsonrpc': '2.0', 'method': 'graph.get', 'params': {'graphids': '1433'}, 'auth': '53ebf3306c0319650f380cbfd652e34e643727cb5b2411a0351d4d4044639f7d', 'id': 1}
zabbix_hosts1 = requests.post(url=url, headers={'Content-Type': 'application/json-rpc'}, json=zabbix_items_authentication).json()['result']
zabbix_items_authentication = {'jsonrpc': '2.0', 'method': 'graph.get', 'params': {}, 'auth': '53ebf3306c0319650f380cbfd652e34e643727cb5b2411a0351d4d4044639f7d', 'id': 1}
zabbix_hosts1 = requests.post(url=url, headers={'Content-Type': 'application/json-rpc'}, json=zabbix_items_authentication).json()['result']
zabbix_items_authentication = {'jsonrpc': '2.0', 'method': 'trigger.get', 'params': {'triggerids': '1433'}, 'auth': '53ebf3306c0319650f380cbfd652e34e643727cb5b2411a0351d4d4044639f7d', 'id': 1}
zabbix_hosts1 = requests.post(url=url, headers={'Content-Type': 'application/json-rpc'}, json=zabbix_items_authentication).json()['result']