This will allow you to use Munin to graph the number of guests / users online on your forum. It's using regex to pull the information from your forum home page (the Users Online Now block).
- Compatible XF Versions:
First, you will need to have Munin installed and working on your server. This isn't a guide on how to install this, so it's it's not already up and running, you'll need to figure how to install and set it up.
Create a new file called xenforo_users in your munin plugin directory ( in my case, /usr/share/munin/plugins/xenforo_users )
File is attached to the resource as a .txt - download and remove the .txt extension, and you can upload to your server, or copy and paste the contents into the empty file on the server.
Now, make the file executable
Step 3Code:chmod +x xenforo_users
Munin runs the require scripts from a different directory to the main are where they are all located. You will need to create a symbolic link back to this file from that directory ( again, in my case, /etc/munin/plugins/ )
You should then see the symlink fileCode:cd /etc/munin/plugins/ ln -s /usr/share/munin/plugins/xenforo_users xenforo_users
You can manually run the script to check it's workingCode:root@vps [/etc/munin/plugins]# ls -al xenforo_users lrwxrwxrwx 1 root root 38 Jan 22 15:14 xenforo_users -> /usr/share/munin/plugins/xenforo_users*
Step 4Code:# ./xenforo_users members.value 14 guests.value 51
The last step is to restart munin-node, so it will produce your new graphs from the xenforo_users script.
You'll now have something resembling the below in your munin pageCode:/etc/init.d/munin-node restart
Empty Graphs or unexpected result from manual execution of script.
If you manually execute the script, and get the below result:
This is failing to get the required information.Code:members.value U guests.value U
You can pass an argument onto the end of the script, which will check for either 404, 403 responses, and also check if the site is indeed a XenForo forum
403 response backCode:./xenforo_users autoconf
suggests some kind of anti-bot mod installed on the siteCode:# ./xenforo_users autoconf Access is being blocked
You are pointing the script at a site NOT running XenForoCode:# ./xenforo_users autoconf Not a XenForo Site
Unmaintained Munin Graph Users / Guests Online 2.2
Plot users / guests online on your forum with Munin