addhosts.py

This script will read a list of hosts & ips from  a text file  & will add a list of zabbix monitored hosts , change the zabbix server ip  http://10.0.0.12/zabbix in script ,as per you zabbix server.
it will add hostname , ipaddress , port , host group , one default template which is set to Linux right now.
Right now i have set this script to add hosts with linux OS template using below line,
hostid = create_host(h,i,'2','10001')  ## here you can change 10001 to your desired default template ,example Windows OS template


A sample  file.txt to  contain list of hosts & ip’s to be added is
 
cat file.txt

hosta   10.0.0.11
hostb   10.0.0.12
hostc   10.0.0.13
hostd   10.0.0.14