zabbix jabber notification

Send script: /etc/zabbix/scripts/sendjabber.py

#!/usr/bin/env python
import xmpp,sys

xmpp_jid = '[email protected]'
xmpp_pwd = 'password'

to = sys.argv[1]
msg = sys.argv[2]

jid = xmpp.protocol.JID(xmpp_jid)
client = xmpp.Client(jid.getDomain(),debug=[])
client.connect()
client.auth(jid.getNode(),str(xmpp_pwd),resource='zabbix')
client.send(xmpp.protocol.Message(to,msg))
client.disconnect()

ln -s /etc/zabbix/scripts/sendjabber.py /usr/lib/zabbix/alertscripts/