Adding host using zabcon

After fiddling around for the better part of the day, I finally found the syntax to add a host to zabbix using zabcon.

First, dump the hostgroups in zabbix
hostgroup.get output=extend

+---------------------+-----------------+----------+
| name | groupid | internal |
+---------------------+-----------------+----------+
| Templates | 100100000000001 | 0 |
| Linux servers | 100100000000002 | 0 |
| Windows servers | 100100000000003 | 0 |
| Zabbix servers | 100100000000004 | 0 |
| Discovered hosts | 100100000000005 | 1 |
+---------------------+-----------------+----------+

Then, add the host to the hostgroup using the following syntax.

add host host="example" port="161" useip="1" dns="example.com" ip="192.168.1.1" groups=[{groupid=100100000000001}]

SSH slow from Ubuntu 11.10

Installed Ubuntu 11.10 yesterday and found that SSH to servers were really slow. A ssh -vvv server shows ssh being stuck on this line:

debug2: ssh_connect: needpriv 0

Fixed it by added the following line to /etc/ssh/ssh_config:
AddressFamily inet