1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained Munin Graph Users / Guests Online 2.2

Plot users / guests online on your forum with Munin

  1. MattW
    Compatible XF Versions:
    • 1.1
    • 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.PNG

    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
    xf_phantom, Volion, Mike and 8 others like this.

Recent Reviews

  1. Puntocom
    Puntocom
    5/5,
    Version: 2.2
    Really useful.
  2. RobParker
    RobParker
    5/5,
    Version: 2.0
    Works great, very simple to setup with good instructions :-)
  3. Puntocom
    Puntocom
    5/5,
    Version: 2.0
    Great addon! very useful and simple.
  4. Tracy Perry
    Tracy Perry
    5/5,
    Version: 2.0
    Works fantastic and makes it easy to monitor via Munin.