Post new topic Reply to topic  [ 65 posts ] 

Board index : GroundWork Monitor Community Edition (GWMCE) : How Do I... ?

Go to page 1, 2, 3, 4, 5  Next

Author Message
 Post subject: Add Cacti to Groundwork
PostPosted: Thu Sep 27, 2007 1:48 pm 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
Adding Cacti to Groundwork.
Cacti is a handy trend & performance history graphing app. Here are some instructions on how to integrate it with the groundwork system. For simplicity sake, I've opted not to use the single sign on (SSO) option on my system, as it's not really worth the effort. I did play around with it and include instructions on using SSO, it seems to work, but I'm not 100% sure it works right. (At least on my test VM, doesn't seem to destory the session upon logout of groundwork). Just skip the SSO stuff if you don't want to use it, the rest of the process doesn't change.


1) Download Cacti
Code:
cd /tmp
wget http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
tar -xzvf cacti-0.8.6j.tar.gz
mv cacti-0.8.6j cacti
mv cacti /usr/local/groundwork/apache2/htdocs/

###

2) Create the MySQL database:
Code:
mysqladmin --user=root create cacti

# Import the default cacti database:
Code:
mysql cacti < cacti.sql

# Optional: Create a MySQL username and password for Cacti. If you've added a mysql passwd, you'll need to login with that.
Code:
mysql --user=root mysql
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
flush privileges;

###

3) Edit Cacti Config in /usr/local/groundwork/apache2/htdocs/cacti/include/config.php and specify the MySQL user, password and database for your Cacti configuration.
Code:
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";

###

4) Add the cacti poller to your /etc/crontab file (I run the poller as root, due to some of the scripts I use in cacti):
Code:
*/5 * * * * root /usr/local/groundwork/bin/php /usr/local/groundwork/apache2/htdocs/cacti/poller.php > /dev/null 2>&1

###

5) Add cacti directory to the /usr/local/groundwork/apache2/conf/httpd.conf file for SSO
Code:
<Directory "/usr/local/groundwork/apache2/htdocs/cacti">
   AuthType Basic
   require valid-user
   TKTAuthLoginURL   http://<server>/monitor/index.php
   TKTAuthCookieName   cacti_auth_tkt
   TKTAuthTimeout 0
</Directory>

# Restart Apache
Code:
/usr/local/groundwork/apache2/bin/apachectl graceful

###

6) Go to cacti admin site:
Code:
http://<server>/cacti/install
Select New Install

# Modify Paths:
Code:
/usr/local/groundwork/bin/snmpwalk
/usr/local/groundwork/bin/snmpget
/usr/local/groundwork/bin/snmpbulkwalk
/usr/local/groundwork/bin/snmpgetnext
/usr/local/groundwork/bin/rrdtool
/usr/local/groundwork/bin/php
FINISH

# Edit Cacti Config (part 2)
#Settings -> General Tab:
Code:
Select RRDTool Version: 1.2

#Settings -> Paths:
Code:
Verify paths are correct for your binaries

#Add fonts path:
Code:
/usr/local/groundwork/share/rrdtool/fonts

#Settings -> Visual (you can play with the fonts & sizes, these are what I use, just because it's the included font in rrdtool)
Code:
Title Font: 8
/usr/local/groundwork/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf
Legend Font: 8
/usr/local/groundwork/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf
Axis Font: 7
/usr/local/groundwork/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf
Unit Font: 7
/usr/local/groundwork/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf

#Settings -> Authentication (since we are using SSO. If you don't want SSO, leave this checked.)
Code:
Uncheck 'Use Cacti's Builtin Auth'

###

7) Wrappit
#General Tab:
Code:
Name: Cacti
Desc: Cacti
Base URL: /cacti
Welcome:

#Menu: (no sub menu's needed)
Code:
N/A

#SSO
Code:
Enable SSO

#Export
Code:
Install Package

###

8) Add view to admin
# Administration -> Roles -> Administrators
Code:
Add cacti view
Logout & Login

# Cacti should be one of the options in the drop-down menu now.

END.

Notes: The PHP that's included in groundwork does not have the '--enable-sockets' option compiled in. This might mean that a few of the scripts available in cacti don't work quite right. I didn't seem to notice any problems when I used it initially for a few weeks, however I've recompiled PHP to add that support on my system now. I'll try to add instructions on that down the road. It's also possible to display RRD's that are generated by Nagios in Cacti (to avoid duplicating the same type checks that Nagios already performs, such as CPU load, disk space etc). I'll document that later also.


Last edited by dave99 on Mon Oct 01, 2007 6:18 pm, edited 1 time in total.

Back to top
 Profile  
 
 Post subject: Cacti RPMs available, too
PostPosted: Fri Sep 28, 2007 2:07 pm 
Offline
User avatar

Joined: Thu Apr 06, 2006 9:52 am
Posts: 221
Location: San Francisco, CA
Thanks for the detailed instructions, they're great! One _slight_ enhancement: to make the Cacti part easier there are Cacti RPMs downloadable from:

http://dag.wieers.com/rpm/packages/cacti/

-Peter

_________________
Peter Mui
Director, Community
GroundWork Open Source
139 Townsend Street, Suite 100
San Francisco, CA 94107
pmui@groundworkopensource.com
+1 415 992 4573


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Wed Nov 28, 2007 8:31 am 
Offline

Joined: Wed Nov 28, 2007 8:29 am
Posts: 1
Nice posting.

I was curious if it's possible to integrate the graphs generated by cacti in to the status page for Groundwork?

Scott


Back to top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 29, 2007 7:20 am 
Offline

Joined: Thu Nov 29, 2007 7:16 am
Posts: 1
I wonder the same as Scott (routehero)... to integrate the graphs to the status page would be sweet :D

/MrNilsson


Back to top
 Profile  
 
 Post subject: Doesnt work.
PostPosted: Fri Mar 21, 2008 3:03 am 
Offline

Joined: Fri Mar 21, 2008 3:01 am
Posts: 2
I have followed the instructions, but it doenst work for me:(

When i doe http://<server>/cacti/install

I don't get the installation page i just go to the standaard welcome page of Groundwork..

Anybody an idea?


Thnx!


grtz

Thijs


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 21, 2008 6:32 am 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
If you log into groundwork, then manually go to the cacti install page, does it work then?


Back to top
 Profile  
 
 Post subject: no
PostPosted: Fri Mar 21, 2008 6:53 am 
Offline

Joined: Fri Mar 21, 2008 3:01 am
Posts: 2
nopz doesnt work for me
any ideas?


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 21, 2008 7:14 am 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
If it is taking you back to the login page, then it sounds like the session isn't being set right.

Look at /usr/local/groundwork/guava/packages/cacti/views/cacti.inc.php and make sure you have a line that looks like:
Code:
$guava->SSO_createAuthTicket("cacti_auth_tkt", $this->baseURL, $_SESSION['username']);


and make sure your httpd.conf has correct authentication set as listed above.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Apr 23, 2008 2:39 am 
Offline

Joined: Wed Apr 23, 2008 2:17 am
Posts: 3
Hi,
I'm Having exactly this same problem.
I've went through all steps as above and stuck on login to cacti. When I'm opening http://my_ip_address/cacti/install it's redirecting me to main gw login page (http://my_ip_address/monitor/index.php).
When I was looking into /usr/local/groundwork/packages there was no cacti folder so I've created one and added
Code:
$guava->SSO_createAuthTicket("cacti_auth_tkt", $this->baseURL, $_SESSION['username']);
to /usr/local/groundwork/packages/cacti/view/cacti.int.php

Am I missing something else in GW (like some extra packages for suport Cacti) ?

Apache error log (from /usr/local/groundwork/apache2/logs/error_log) looks as follows:
Code:
[Wed Apr 23 12:55:48 2008] [error] [client 10.2.2.96] PHP Warning:  session_destroy() [<a href='function.session-destroy'>function.session-destroy</a>]: Trying to destroy uninitialized session in /usr/local/groundwork/guava/includes/sessions.inc.php on line 126
[Wed Apr 23 12:55:48 2008] [error] [client 10.2.2.96] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /usr/local/groundwork/guava/includes/sessions.inc.php:126) in /usr/local/groundwork/guava/includes/sessions.inc.php on line 161


I've been searching for that problem on forum, but given solution (stop apache, rm session* and tpl* files, restart apache) didn't help at all.

Do you have any suggestions ?

Thanks
Marcin iwi Iwinski


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Apr 23, 2008 5:55 am 
Offline

Joined: Wed Apr 23, 2008 2:17 am
Posts: 3
UPDATE:

Problem solved :)
Iv'e removed /usr/local/groundwork/guava/packages/cacti,
add cacti again in wrappit and open cacti from GW.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Jul 28, 2008 2:09 am 
Offline

Joined: Mon Jul 28, 2008 2:05 am
Posts: 3
Location: Modesta and Turlock, CA
I am having the same problem attempting this integration. Using the latest versions of both products (Groundworks Monitor and Cacti). I get through step 6 and run into the following:
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /usr/local/groundwork/guava/includes/sessions.inc.php on line 126

I tried the steps suggested in this thread to add Cacti using Wrappit. No success there as well.

Any help or suggestions out there?

Running on CentOS 4.4 server.

TIA


Back to top
 Profile WWWYIM 
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Aug 13, 2008 9:59 am 
Offline

Joined: Tue Jul 01, 2008 6:37 am
Posts: 20
Help!!!
I have being trying to add cacti to groundwork to no avail using the instructions in this thread.
I am running redhat enterprise linux 5 with groundwork community edition 5.2.1.
I enable single sign on on apache.
When I log on to add cacti with wrappit, cacti installation runs endless.
I have to manually stop it.
Cacti is added to the list of packages, added in roles, but does not appear in drop down menu.Cacti shows uninstalled from the package list.
Any attempt to install from the package list fails
Help is neeed on how to install Cacti successful in guava.
Thanks in anticipation


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Aug 13, 2008 2:48 pm 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
It seems that guava can be kind of finicky sometimes about making the whole wrappit thing work. I'd remove the current entry for the cacti wrap, and try re-adding it.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Aug 19, 2008 10:56 am 
Offline

Joined: Tue Jul 01, 2008 6:37 am
Posts: 20
At last I am able to get Cacti inside the groundwork interface but the page cannot open yet.
I used the following in my apache config file

Alias /cacti/ "/usr/local/groundwork/apache2/htdocs/cacti/"

<Directory "/usr/local/groundwork/apache2/htdocscacti">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>

PLEASE help , I don't know what I may be missing

I created the files package.pkg and cacti.inc.php, installed cacti from package list under administration menu. Added cacti to roles. Cacti appears on the menu but a click on it gives the following error message

AN ERROR HAS OCCURED THE ATTEMTED RESPONSE IS BELOW

T<html>
<head>
<title>Login to Cacti</title>
<STYLE TYPE="text/css">
<!--
BODY, TABLE, TR, TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
A {text-decoration: none;}
A:active { text-decoration: none;}
A:hover {text-decoration: underline; color: #333333;}
A:visited {color: Blue;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" onload="document.login.login_username.focus()">
<form name="login" method="post" action="index.php">
<input type="hidden" name="action" value="login">
<table align="center">
<tr>
<td colspan="2"><img src="images/auth_login.gif" border="0" alt=""></td>
</tr>

<tr height="10"><td></td></tr>
<tr>
<td colspan="2">Please enter your Cacti user name and password below:</td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td>User Name:</td>
<td><input type="text" name="login_username" size="40" style="width: 295px;" value=""></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="login_password" size="40" style="width: 295px;"></td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td><input type="submit" value="Login"></td>
</tr>
</table>
</form>
</body>
</html>


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Aug 19, 2008 11:30 am 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
First thing is you are missing a / in this between htdocs & cacti:
Code:
<Directory "/usr/local/groundwork/apache2/htdocscacti">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>


Second thing is I would try to get cacti up & working & configured correctly before you start trying to add it into the menu with wrappit. Not sure if you are there yet.


Back to top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ] 

Board index : GroundWork Monitor Community Edition (GWMCE) : How Do I... ?

Go to page 1, 2, 3, 4, 5  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Follow us on Twitter    Visit our Facebook page    Blog Talk Radio
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.