Displays the number of online users via the http interface of ejabberd.
- To compile, clone it to the ejabberd-modules folder you checked out from svn and call
./build.sh
(ignore the warning regarding LocalPath). - After that, copy ebin/mod_onlineusers.ebin to your ebin folder of ejabberd.
- Then, edit ejabberd.cfg and add the following to your modules config:
{mod_onlineusers, []}
. - Also in ejabberd.cfg, add to your http-listen configuration the following:
{request_handlers, [{["onlineusers"], mod_onlineusers}]}
- Restart ejabberd
Go to http://example.com:5280/onlineusers to see your quantity online users.
Go to http://example.com:5280/onlineusers/list to see your currently online users.
Go to http://example.com:5280/onlineusers/jabber.example.com to see your currently online users to virtual hosts jabber.example.com.
(Change example.com to your server & 5280 to your ejabberd http port).
Be aware: I just did it because I didn't find a better way to do it via a standard module from ejabberd. There may be bugs and there may be a better way to achieve it.