Resource icon

Unmaintained Munin Graph Users / Guests Online 2.2

No permission to download
Compatible XF 1.x versions
  1. 1.1
  2. 1.2
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).

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.

Step 1
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.

Step 2
Now, make the file executable

Code:
chmod +x xenforo_users

Step 3
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/ )

Code:
cd /etc/munin/plugins/
ln -s /usr/share/munin/plugins/xenforo_users xenforo_users

You should then see the symlink file
Code:
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*

You can manually run the script to check it's working
Code:
# ./xenforo_users      
members.value 14
guests.value 51

Step 4
The last step is to restart munin-node, so it will produce your new graphs from the xenforo_users script.

Code:
/etc/init.d/munin-node restart

You'll now have something resembling the below in your munin page

xenforo_users.webp


Trouble Shooting
Empty Graphs or unexpected result from manual execution of script.

If you manually execute the script, and get the below result:
Code:
members.value U
guests.value U
This is failing to get the required information.

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

Code:
./xenforo_users autoconf

403 response back
Code:
# ./xenforo_users autoconf
Access is being blocked
suggests some kind of anti-bot mod installed on the site

Code:
# ./xenforo_users autoconf
Not a XenForo Site
You are pointing the script at a site NOT running XenForo
Author
MattW
Downloads
49
Views
849
First release
Last update

Ratings

5.00 star(s) 3 ratings

More resources from MattW

Latest updates

  1. Big Board Fix 2 and XF 1.2 Update

    The attached zip now contains two files, one for XenForo 1.1.X and one for XenForo 1.2.X Please...
  2. Large Board Fix

    This version adds a fix in to remove the comma used for thousand separators on large boards...
  3. Various Updates to Script

    I've updated the Perl script to include some error checking. You can now use autoconf to check...

Latest reviews

Really useful.
Works great, very simple to setup with good instructions :-)
Great addon! very useful and simple.
Works fantastic and makes it easy to monitor via Munin.
Top Bottom