Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for real-time communication, which powers a wide range of applications. Monitoring such as Icinga notifications or alive ping from a mobile phone.
Installation of ejabberd instant messaging server for XMPP:
1 | apt-get install ejabberd |
1 | dpkg -l ejabberd |
ejabberd 2.1.10-4+deb
Initial configuration to set FQDN and create admin user:
1 | dpkg-reconfigure ejabberd |
1 2 3 4 | vim /etc/ejabberd/ejabberd.cfg {hosts, ["xmpp.drobot.de"]}. {acl, admin, {user, "id", "xmpp.drobot.de"}}. |
Generate self signed certificate:
1 2 | openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -keyout xmpp.drobot.de.key -out xmpp.drobot.de.crt cat xmpp.drobot.de.crt xmpp.drobot.de.key > xmpp.drobot.de.pem |
Set path to the self signed cert. in following configs:
1 2 3 | starttls, {certfile, "/etc/ejabberd/xmpp.drobot.de.pem"} {s2s_use_starttls, true}. {s2s_certfile, "/etc/ejabberd/xmpp.drobot.de.pem"}. |
Useful Munin Plugin for passive ejabberd monitoring:
Try also XMPP from anywhere with jappix – a self hosted web based client.
XMPP-Client for iPhone: ChatSecure
XMPP-Client for android: Xabber
Logging Module:
1 2 3 4 5 6 7 | cd /usr/src svn co https://svn.process-one.net/ejabberd-modules cd ejabberd-modules/mod_log_chat/trunk/ bash -x build.sh cp ebin/mod_log_chat.beam /usr/lib/ejabberd/ebin/ mkdir -p /var/log/ejabberd/chat chown ejabberd:ejabberd /var/log/ejabberd/chat |
Enable logging module in “{modules” section:
1 2 | vim /etc/ejabberd/ejabberd.cfg {mod_log_chat, [{path, "/var/log/ejabberd/chat"}, {format, html}]}, |
Possible log formats: html or text
Leave a Reply