Vbulletin Posts/Threads/Users

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

Moderators: Developers, Moderators

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

Vbulletin Posts/Threads/Users

Post by africanw »

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
Posts
Posts
vbulletin_Posts.png (5.1 KiB) Viewed 39469 times
Threads
Threads
vbulletin_threads.png (4.49 KiB) Viewed 39469 times
Users
Users
vbulletin_Users.png (5.66 KiB) Viewed 39469 times
africanw
Cacti User
Posts: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

Here are the actual scripts and templates
Attachments
Vbulletin.zip
Templates and scripts
(32.3 KiB) Downloaded 1739 times
User avatar
Onkel_Tom
Posts: 16
Joined: Sat Apr 23, 2005 7:48 pm
Location: Germany

Post by Onkel_Tom »

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: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

not sure. Which one is causing the problem?

I have attached the templates again. Give them ago.
Attachments
vb.rar
(12.88 KiB) Downloaded 1490 times
User avatar
Onkel_Tom
Posts: 16
Joined: Sat Apr 23, 2005 7:48 pm
Location: Germany

Post by Onkel_Tom »

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 ;)
User avatar
Onkel_Tom
Posts: 16
Joined: Sat Apr 23, 2005 7:48 pm
Location: Germany

Post by Onkel_Tom »

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: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

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

Post by sdetroch »

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: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

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

hi

Post by aboyz »

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

Post by offlinetn »

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

Post by ChrisHasenpflug »

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 1511 times
vbulletin_threads.php.txt
Remove .txt extension
(2.18 KiB) Downloaded 1641 times
africanw
Cacti User
Posts: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

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

Who is online

Users browsing this forum: No registered users and 2 guests