主机自动注册
Configuration -> Actions -> auto registration -> Ceate action
Host name: {HOST.HOST}
Host ip: {HOST.IP}
Agent port: {HOST.PORT}
选Host metadata类Like来匹配
1.自动添加主机到zabbix server
2.自动添加主机到指定的主机组
配置trigger(基于模板)
这里总共添加4步
step1
Required string是登录页面才会有的字符串,这里为"Zabbix SIA"
step2
Post请求来登录name={user}&password={password}&enter=Sign in
#!/usr/bin/env
python
# -*-
coding: UTF-8 -*-
#
http://zabbix.org/wiki/Docs/api/libraries#Python
#
https://github.com/lukecyca/pyzabbix
# pip
install pyzabbix
from
pyzabbix
import
ZabbixAPI
zapi
=
ZabbixAPI('http://localhost/zabbix')
zapi.login('Admin',
'zabbix')
print(zapi.api_version())
for
host
in
zapi.host.get(output="extend"):