Vbulletin Posts/Threads/Users
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 130
- Joined: Thu Mar 31, 2005 4:24 pm
- Location: Sydney, Asutralia
- Contact:
Vbulletin Posts/Threads/Users
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
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
- vbulletin_Posts.png (5.1 KiB) Viewed 39521 times
-
- Threads
- vbulletin_threads.png (4.49 KiB) Viewed 39521 times
-
- Users
- vbulletin_Users.png (5.66 KiB) Viewed 39521 times
-
- Cacti User
- Posts: 130
- Joined: Thu Mar 31, 2005 4:24 pm
- Location: Sydney, Asutralia
- Contact:
Here are the actual scripts and templates
- Attachments
-
- Vbulletin.zip
- Templates and scripts
- (32.3 KiB) Downloaded 1742 times
Thanks for your work and idea !
I've installed it but ge the error:
from RRD debug mode.
any idea how to fix it ?
I've installed it but ge the error:
Code: Select all
ERROR: can't parse '#9FA4EE:registered'
any idea how to fix it ?
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:
I'm a beginner with cacti so I can't fix the problem on my own at the moment
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'
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
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
-
- Posts: 1
- Joined: Thu Aug 30, 2007 10:13 pm
VBulletin Cacti Slow Queries fix
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.
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 1515 times
-
- vbulletin_threads.php.txt
- Remove .txt extension
- (2.18 KiB) Downloaded 1643 times
Who is online
Users browsing this forum: No registered users and 2 guests