Hy.
I've managed to make my first script/template for Cacti.
It shows the current user count and share size from Verlihub. You must have STATS plugin loaded and running in verlihub for this to work.
To make it work follow this steps :
1. edit the 2 perl scripts and enter a username and password that can access the verlihub table in mySQL (it must be a mySQL user, not a linux user ).
2. copy the 2 Perl scripts to your cacti/plugins folder.
3. import the 2 XML templates
4. create the graphs, and you should be set.
NOTE : look in the XML file, you might need to change the path to perl according to your system's settings (for me it's /usr/bin/perl but on other systems might be /usr/local/bin/perl)
Happy "graphing"
Verlihub Stats (user count and sharesize)
Moderators: Developers, Moderators
Verlihub Stats (user count and sharesize)
- Attachments
-
- VerliHub_Stats.zip
- the scripts
- (973 Bytes) Downloaded 1185 times
-
- verlihub_share_size.xml
- the template for share size
- (7.06 KiB) Downloaded 1326 times
-
- verlihub_user_count.xml
- the template for user count
- (7.06 KiB) Downloaded 1458 times
-
- the sharesize looks like this
- graph_image_sharesize.png (16.31 KiB) Viewed 11330 times
-
- the user count looks like this
- graph_image_usercount.png (15.1 KiB) Viewed 11330 times
Re: Verlihub Stats (user count and sharesize)
My suggestion
Little fix to perl scripts to use remote DB and diferent DB:
replace with
Little fix to perl scripts to use remote DB and diferent DB:
Code: Select all
my $db_user = 'user_name';
my $db_pass = 'password';
my $dbh = DBI->connect('DBI:mysql:verlihub', $db_user, $db_pass)
or die "Couldn't connect to database: " . DBI->errstr;
Code: Select all
my $db = 'verlihub_db';
my $host = 'db_host';
my $user = 'verlihub_user';
my $pass = 'verlihub_password';
# Connect to the database.
my $dbh = DBI->connect("DBI:mysql:database=$db;host=$host",
$user, $pass,
{'RaiseError' => 1});
Who is online
Users browsing this forum: No registered users and 3 guests