zabbix python
-
[ Zabbix ] Automatic login using Python's Selenium. (셀레니움을 이용한 zabbix 자동 로그인)Open Source 2019. 12. 17. 08:36
from selenium import webdriver brower = webdriver.Chrome('chromedriver.exe') brower.get('url') # username username = brower.find_element_by_id('name').send_keys('username') # password password = brower.find_element_by_id('password').send_keys('password') # Button Click brower.find_element_by_id("enter").click()
-
[ Zabbix ] Python의 ZabbixAPI_py 모듈을 이용한 problem 상태 받아오기Open Source 2019. 12. 13. 09:14
python 모듈을 이용해 zabbix problem 데이터를 gethering - Test Zabbix Version : 4.4.3 - Python Module : ZabbixAPI_py from ZabbixAPI_py import Zabbix from datetime import datetime zabbix = Zabbix('url') # zabbix url zabbix.login('id','password') # zabbix 계정정보 for x in zabbix.problem(method='get'): print(datetime.fromtimestamp(int(x['clock'])),x['name']) # problem 데이터 gethering # int(x['clock']) 유닉스 time 형식이..