Resource icon

Munin Graph Users / Guests Online 2.2

No permission to download
It's something specific to your site. If I change the URL in the script to be your site, I don't get a value back.

If I change it to xenforo.com/community:

root@vps [/usr/share/munin/plugins]# ./xenforo_users
members.value 88
guests.value 441
 
It's something specific to your site. If I change the URL in the script to be your site, I don't get a value back.

If I change it to xenforo.com/community:

root@vps [/usr/share/munin/plugins]# ./xenforo_users
members.value 88
guests.value 441

yep... and I'm beginning to look at apache. I looked in my access log and found
192.73.236.43 - - [17/Mar/2013:14:45:03 -0400] "GET / HTTP/1.1" 403 2365 "-" "libwww-perl/5.836"

Yep... just manually ran it again twice and got the same entry.. Google, here I come.

Didn't need Google... just some good old thinking cap time. zBBlock was blocking it as a hack attempt. Disabled zBBlock and it works as supposed to. Now to see if putting an exception in my file for my IP will allow me to keep zBBlock running.
Adding an exception in my customsig.inc solved the problem!!!
 
Yep, you are blocking the perl script from connecting, and sending back a 403 forbidden

:D
zBBlock strikes again... first it hits someone trying to visit my site from a mail server (like it's supposed to) and then it knocks the snot out of me.. NOT like it's supposed to. hehehehehe
 
You need to either disable its rule regarding libwww-perl requests, or specifically allow it. mod_security will prevent this as well as a default behavior (using the ASL rules).
 
You need to either disable its rule regarding libwww-perl requests, or specifically allow it. mod_security will prevent this as well as a default behavior (using the ASL rules).
Just added an IP exclusion... took all of 30 seconds once I figured out what it was... I was working in the foreground with my post up in the background to MattW, fixed it and came back and finished my post then saw he had found the same thing I did. ;)
 
I have the same problem :S I'd love to have this working!
Code:
root@www:/etc/munin/plugins# ./xenforo_users autoconf
root@www:/etc/munin/plugins# ./xenforo_users
members.value U
guests.value U
 
So running it with autoconf isn't reporting any errors, it must be something else. Are you getting anything in the access logs reporting a perl script being blocked?
 
I have the same problem :S I'd love to have this working!
Code:
root@www:/etc/munin/plugins# ./xenforo_users autoconf
root@www:/etc/munin/plugins# ./xenforo_users
members.value U
guests.value U
What is your website? I looked in your profile and it's not listed. I was going to modify one of my munin plugins to point there and check.
 
I found the error, I had to replace
Code:
if ($response->content =~ /Online\snow\:\s\d+\s\(members\:\s(\d+)\,\sguests\:\s(\d+)\)/im)
to
Code:
if ($response->content =~ /Total\:\s\d+\s\(miembros\:\s(\d+)\,\sinvitados\:\s(\d+)\)/im)

It did not detect the numbers due to the language :)
 
When I make this twice for two sites in the same server, in one of them I get U U . Do you know how can I avoid this? I changed graph_title with no results.
 
It's not something I've tried, but you can probably duplicate the script, install as before, and call it xenforo_users_2

Inside the script, just change the reference to "Forum Users" to "Forum 2 Users"
 
It works now, I also changed $ua for $uaa at the end.

Thank you, I have just discovered Munin and it's extremely useful, it has been a great idea to include the XenForo stats.
 
root@host:/etc/munin/plugins# ./xenforo_users
members.value U
guests.value U
root@host:/etc/munin/plugins# ./xenforo_users_2
members.value 2
guests.value 13

I changed what you said but the first plugin is not working, any idea?
 
can you do a diff on the two files so I can see what is different?

Code:
# diff xenforo_users xenforo_users_2
 
Code:
root@host:/etc/munin/plugins# diff xenforo_users xenforo_users_2
19c19
< my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://www.example1.com";
---
> my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://www.example2.com";
52c52
<        print "graph_title Forum Users\n";
---
>        print "graph_title Forum 2 Users\n";
 
I don't see any reason why the first one isn't working, if all you have changed is added a second script, which should have nothing to do with how the first is being executed.
 
Back
Top Bottom