| GroundWork Community Support http://www.groundworkopensource.com/community/forums/ |
|
| Add Cacti to Groundwork http://www.groundworkopensource.com/community/forums/viewtopic.php?f=23&t=1317 |
Page 1 of 5 |
| Author: | dave99 [ Thu Sep 27, 2007 1:48 pm ] |
| Post subject: | Add Cacti to Groundwork |
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. |
|
| Author: | pmui [ Fri Sep 28, 2007 2:07 pm ] |
| Post subject: | Cacti RPMs available, too |
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 |
|
| Author: | routehero [ Wed Nov 28, 2007 8:31 am ] |
| Post subject: | |
Nice posting. I was curious if it's possible to integrate the graphs generated by cacti in to the status page for Groundwork? Scott |
|
| Author: | MrNilsson [ Thu Nov 29, 2007 7:20 am ] |
| Post subject: | |
I wonder the same as Scott (routehero)... to integrate the graphs to the status page would be sweet /MrNilsson |
|
| Author: | twproductions [ Fri Mar 21, 2008 3:03 am ] |
| Post subject: | Doesnt work. |
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 |
|
| Author: | dave99 [ Fri Mar 21, 2008 6:32 am ] |
| Post subject: | |
If you log into groundwork, then manually go to the cacti install page, does it work then? |
|
| Author: | twproductions [ Fri Mar 21, 2008 6:53 am ] |
| Post subject: | no |
nopz doesnt work for me any ideas? |
|
| Author: | dave99 [ Fri Mar 21, 2008 7:14 am ] |
| Post subject: | |
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. |
|
| Author: | iwi [ Wed Apr 23, 2008 2:39 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
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.phpAm 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 |
|
| Author: | iwi [ Wed Apr 23, 2008 5:55 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
UPDATE: Problem solved Iv'e removed /usr/local/groundwork/guava/packages/cacti, add cacti again in wrappit and open cacti from GW. |
|
| Author: | turlockaviator [ Mon Jul 28, 2008 2:09 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
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 |
|
| Author: | fieze [ Wed Aug 13, 2008 9:59 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
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 |
|
| Author: | dave99 [ Wed Aug 13, 2008 2:48 pm ] |
| Post subject: | Re: Add Cacti to Groundwork |
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. |
|
| Author: | fieze [ Tue Aug 19, 2008 10:56 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
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> |
|
| Author: | dave99 [ Tue Aug 19, 2008 11:30 am ] |
| Post subject: | Re: Add Cacti to Groundwork |
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. |
|
| Page 1 of 5 | All times are UTC - 8 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|