Vbulletin Posts/Threads/Users

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Vbulletin Posts/Threads/Users

#1 Post by africanw » Tue Apr 19, 2005 6:13 pm

Hi,

Have created three graphs for Vbulletin. Based on what this thread was on about (http://forums.cacti.net/viewtopic.php?t ... =vbulletin).

This has been tested and works with Cacti (0.86c) running on Fedora Core 3.

Colours are abit horrible but thats a easy thing you can change.

AW
Attachments
vbulletin_Posts.png
Posts
vbulletin_Posts.png (5.1 KiB) Viewed 36384 times
vbulletin_threads.png
Threads
vbulletin_threads.png (4.49 KiB) Viewed 36384 times
vbulletin_Users.png
Users
vbulletin_Users.png (5.66 KiB) Viewed 36384 times

africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

#2 Post by africanw » Tue Apr 19, 2005 6:14 pm

Here are the actual scripts and templates
Attachments
Vbulletin.zip
Templates and scripts
(32.3 KiB) Downloaded 1647 times

Onkel_Tom
Posts: 12
Joined: Sat Apr 23, 2005 7:48 pm

#3 Post by Onkel_Tom » Sat Apr 23, 2005 7:51 pm

Thanks for your work and idea !

I've installed it but ge the error:

Code: Select all

ERROR: can't parse '#9FA4EE:registered'
from RRD debug mode.
any idea how to fix it ?

africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

#4 Post by africanw » Sun Apr 24, 2005 4:29 pm

not sure. Which one is causing the problem?

I have attached the templates again. Give them ago.
Attachments
vb.rar
(12.88 KiB) Downloaded 1397 times

Onkel_Tom
Posts: 12
Joined: Sat Apr 23, 2005 7:48 pm

#5 Post by Onkel_Tom » Sun Apr 24, 2005 4:55 pm

It doesn't matter which template. All Templates get the same error.
I tried you new templates and while adding the vBulletin users template to the graph management I get this error:

Code: Select all

ERROR: can't parse '#9FA4EE:Registered'
I'm a beginner with cacti so I can't fix the problem on my own at the moment ;)

Onkel_Tom
Posts: 12
Joined: Sat Apr 23, 2005 7:48 pm

#6 Post by Onkel_Tom » Sun Apr 24, 2005 5:00 pm

Sorry, I fixed it !
I forgot to associate the graph item fields with the right data.
thanks for this great addon ;)

africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

#7 Post by africanw » Mon Apr 25, 2005 2:44 am

np

sdetroch
Posts: 26
Joined: Thu Mar 31, 2005 7:39 pm

#8 Post by sdetroch » Tue Apr 26, 2005 5:21 pm

It's not that difficult to include vbulletin stats in cacti.
For instance, create a php script with the following content for the users online:

#!/usr/bin/php
<?
$numberusers = 0;

$hostname = "domainname_server_vbulletin";
$username = "database_username";
$password = "database_password";
$dbname = "name_database_vbulletin";

$connection = mysql_connect($hostname,$username,$password) or die ("Cannot connect to server.");
$db = mysql_select_db($dbname,$connection) or die ("Could not select database.");

$sql = "SELECT COUNT(DISTINCT userid) AS username FROM user";
$totalusers = mysql_result(mysql_query($sql, $connection),0,"username");

mysql_close($connection);

print "$totalusers";
?>



for the amount of postings you can i.e. use:

$sql = "SELECT COUNT(DISTINCT postid ) AS postid FROM post";
$postid = mysql_result(mysql_query($sql, $connection),0,"postid");


and so on ... have a look in the database of vbulletin to see which query you need for which counter.

regards,
Sven

africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

#9 Post by africanw » Wed Apr 27, 2005 6:04 am

Nope its not hard if you know how to do it:).

aboyz

hi

#10 Post by aboyz » Fri May 20, 2005 11:07 pm

hi,

can someone tell me what to do with this graph file.
data template
graph template

I unzip them and i got 4 .xml file

do I just import them? anyone know how this is done. please can someone post a step by step on how to get this going . i'm lost

thanks

offlinetn
Posts: 3
Joined: Tue Oct 31, 2006 4:24 pm

#11 Post by offlinetn » Tue Oct 31, 2006 4:28 pm

I am new at cacti and I installed this and it works great! Would it be hard to add some more statistics like # of newly registering users?

Thanks!

ChrisHasenpflug
Posts: 1
Joined: Thu Aug 30, 2007 10:13 pm

VBulletin Cacti Slow Queries fix

#12 Post by ChrisHasenpflug » Thu Aug 30, 2007 10:26 pm

Hi all,

Apologies for the bump of this old thread, however this is still the top google result for "cacti vbulletin" and where the scripts originated from, so it only seemed appropriate to post this here.

We've been trying to track down the cause of some table locks on our server, and in doing so have been closely monitoring our slow query log. In doing so, the queries done by these scripts caught our eye.

The initial release of these scripts does math on the dateline column. This creates a performance issue because MySQL can not use indexes and has to do a full table scan which is highly inefficient for any decently sized vB board.

Simply moving the math to the other side of the where clause reduces the time for these queries significantly. And given that the scripts run every 5 minutes, it has helped eliminate problems with table locking resulting in a more responsive server.

I will attach the modified files and hope they can be included in the initial download for the greatest distribution.
Attachments
vbulletin_posts.php.txt
Remove .txt extension
(2.14 KiB) Downloaded 1422 times
vbulletin_threads.php.txt
Remove .txt extension
(2.18 KiB) Downloaded 1523 times

africanw
Cacti User
Posts: 124
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

#13 Post by africanw » Thu Sep 27, 2007 12:41 am

I will make some updates on the scripts and add some new ones this week or next.

Post Reply