Post new topic Reply to topic  [ 65 posts ] 

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

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

Author Message
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Fri Aug 22, 2008 9:07 am 
Offline

Joined: Tue Jul 01, 2008 6:37 am
Posts: 20
thanks for your reply dave99,
the cacti directory path in httpd.conf is okay.
I removed the package.pkg and cacti.inc.php files I created and tried adding cacti with wrappit and was able to add it into groundwork.
the only challenge was mysql setting, I changed database user to root with the root user password in the include/config.php for the system to be able to access cacti via the cacti tab inside groundwork.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Nov 06, 2008 5:21 am 
Offline

Joined: Wed Nov 07, 2007 1:01 pm
Posts: 8
Hi

I got cacti up and running on groundwork comunity edition.
I did get almost all of the mentioned errors while following the guide as other members have reported

I did the following (more or less the initial description but in a different order)
(SORRY FOR THE VERY BAD FORMATTING>

Installing cacti in groundworks
Prereqs – GWOS up and running

/files must exist
cd /files
wget http://www.cacti.net/downloads/cacti-0.8.6k.tar.gz
tar –xzvf cacti-0.8.6k.tar.gz
mv cacti-0.8.6k cacti
mv cacti /usr/local/groundwork/apache2/htdocs/
mysqladmin --user=root create cacti
cd /usr/local/groundwork/apache2/htdocs/cacti
mysql cacti < cacti.sql
mysql --user=root mysql
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
flush privileges;
exit

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.

Add the cacti poller to your /etc/crontab file:
*/5 * * * * root /usr/local/groundwork/bin/php /usr/local/groundwork/apache2/htdocs/cacti/poller.php > /dev/null 2>&1

Add cacti directory to the /usr/local/groundwork/apache2/conf/httpd.conf file for SSO

<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

mkdir /usr/local/groundwork/apache2/htdocs/cacti/log

In a browser add new menu to groundwork (wrapit under administration)
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.
Use the new menu to install

Correct the paths during install (rest is default)
/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

Login using admin/admin
# 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'

Thats it - it works for me - it is not really a new install guide - but more or less a different order of doing things to avoid problems during cacti install

_________________
Best regards
Lars Skau
Lets keep the world open


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Dec 17, 2008 9:43 pm 
Offline

Joined: Mon Dec 01, 2008 9:28 pm
Posts: 11
this worked a treat

i had problems with getting the graphs to display - i just dumped the rrd's from cacti into groundwork rra folder and was all good

cheers mate


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Feb 12, 2009 2:04 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Hello,

I'm trying to integrate Cacti in Groundwork Community Edition and am confronted with a problem in this procedure.

Could anyone advice me how I can perform the actions in regard to the mysql part? I keep stumbling on the same problem over and over again, that says that :

mysqladmin -S /usr/local/groundwork/mysql/tmp/mysql.sock --user=root create cacti
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Since I'm not very familiar with MySQL I'm having a very hard time finding the solution to perform this.

I really hope that someone in the community can help me.

My Groundwork is installed on a Debian machine (basic net install, no extras, standard Groundwork Community edition 5.3 installed).

Thanks in advance for helping out.

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Feb 12, 2009 9:49 am 
Offline
Site Admin
User avatar

Joined: Thu Oct 12, 2006 6:39 am
Posts: 1126
Location: Charlotte, NC
If you know the mysql root passwd, then try this

mysqladmin -p -S /usr/local/groundwork/mysql/tmp/mysql.sock --user=root create cacti

The -p option will tell it to prompt for a password. Give it the root pw, and all might be well...


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Feb 12, 2009 11:15 pm 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Thanks Slander, worked like a charm.

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Fri Feb 13, 2009 3:52 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Hi guys,

Hope you can help me out with this one (although there is no doubt in my mind).

Following the instructions listed above I was able to install cacti. However when I go to the menu option Cacti I get the error:

Error

The following PHP extensions are missing:

* sockets

Please install those PHP extensions and retry

from Cacti.

Since it seems that php is installed as part of Groundwork I don't know how I can add extensions.

Could you please help me out on this one?

Thanks in advance,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Fri Feb 13, 2009 8:33 am 
Offline
Site Admin
User avatar

Joined: Thu Oct 12, 2006 6:39 am
Posts: 1126
Location: Charlotte, NC
Could you run ps -ef | grep mysql, and post the results, along with the contents of /etc/my.cnf?

Something in your mysql install is not right.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Sat Feb 14, 2009 2:08 pm 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
Generally cacti doesn't need it, I believe there are only a few checks that require it, although it will warn you about it. I've noticed previously that sockets were not compiled into the php that ships with groundwork. I've recompiled to add it without problem.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Feb 16, 2009 2:41 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Hi Slander,

This is the output:

operador@srvnagios:~$ ps -ef | grep mysql
root 2518 1 0 Feb13 ? 00:00:00 /bin/sh /usr/local/groundwork/mysql/bin/mysqld_safe --defaults-file=/usr/local/groundwork/mysql/my.cnf --port=3306 --socket=/usr/local/groundwork/mysql/tmp/mysql.sock --old-passwords --datadir=/usr/local/groundwork/mysql/data --log-error=/usr/local/groundwork/mysql/data/mysqld.log --pid-file=/usr/local/groundwork/mysql/data/srvnagios.pid --default-table-type=InnoDB
mysql 2581 2518 0 Feb13 ? 00:18:39 /usr/local/groundwork/mysql/bin/mysqld.bin --defaults-file=/usr/local/groundwork/mysql/my.cnf --basedir=/usr/local/groundwork/mysql --datadir=/usr/local/groundwork/mysql/data --user=mysql --pid-file=/usr/local/groundwork/mysql/data/srvnagios.pid --skip-external-locking --open-files-limit=8192 --port=3306 --socket=/usr/local/groundwork/mysql/tmp/mysql.sock --old-passwords --default-table-type=InnoDB
operador 5611 5525 0 11:51 pts/0 00:00:00 grep mysql

The my.cnf file doesn't exist in /etc

operador@srvnagios:~$ cat /etc/my.cnf
cat: /etc/my.cnf: No such file or directory

but does in /usr/local/groundwork (standard install of groundwork)

operador@srvnagios:~$ cat /usr/local/groundwork/mysql/my.cnf
#
# Copyright 2008 GroundWork Open Source, Inc. ("GroundWork")
# All rights reserved. Use is subject to GroundWork commercial license terms.
#

#
# Tuning of the MYSQL database for best performance on system conform with Systems described in the System planning Guide
# Last Update: July 2008
#

[mysqladmin]
user=root
port=3306
socket=/usr/local/groundwork/mysql/tmp/mysql.sock


[mysqld]
basedir=/usr/local/groundwork/mysql
datadir=/usr/local/groundwork/mysql/data
port=3306
socket=/usr/local/groundwork/mysql/tmp/mysql.sock
tmpdir=/usr/local/groundwork/mysql/tmp

max_connections = 125

innodb_buffer_pool_size=100M
innodb_log_buffer_size=5M
innodb_log_file_size=256M

key_buffer_size=64M
sort_buffer_size=2M
read_buffer_size=1M

join_buffer_size=8M
read_rnd_buffer_size=4M
innodb_flush_log_at_trx_commit=0

#disable double buffer on file sync
innodb_flush_method=O_DIRECT

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size = 16M
max_heap_table_size=16M

max_tmp_tables=64

query_cache_size=128M
query_cache_type=1
thread_cache_size=20

#optimize or alter command
myisam_sort_buffer_size=256M

table_cache=4096

[mysqld_safe]

mysqld=mysqld.bin
# Increase the amount of open files allowed per process. Warning: Make
# sure you have set the global system limit high enough! The high value
# is required for a large number of opened tables
open-files-limit = 8192

[mysql]
port=3306
socket=/usr/local/groundwork/mysql/tmp/mysql.sock

Dave99,

I believe you when you say that Cacti doesn't need the sockets but I can't get past that error screen. Do I need to disable something in a config file?


Thanks guys for any assistance,

Sincerely,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Feb 16, 2009 8:34 am 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
Perhaps the more recent builds of cacti won't let installation proceed if sockets are missing. I've just recompiled php from the start on my last couple of installs, before installing cacti, so I haven't noticed anything.

If you want to recompile php, it's pretty straightfoward:
You need to see what the current configure options are for php, so in /usr/local/groundwork/apache2/htdocs, create a file called pinfo.php. In that file put this:
Code:
<?
phpinfo();
?>


Then pull that page up in your browser. Right at the top it should give you your configure command. Copy that into notepad or similar, and at the end of it, add:
Code:
--enable-sockets

just like all the other stuff there.

download the source tar.gz from php.net (5.2.8), and put it in /usr/local/src
tar -xzvf php-5.2.8.tar.gz
cd into the folder it creates
run the new configure command you have.
Assuming that runs without errors, then do a make, then a make install. You should then have the new version of php w/ sockets.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Feb 16, 2009 9:05 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Hello Dave,

When compiling PHP (following your indications, getting the command from the phpinfo page) I get the following error:

configure: error: Cannot find MySQL header files under /usr/local/groundwork/mysql.
Note that the MySQL client library is not bundled anymore!

Hence I cannot 'make' or 'make install'.

Do you know how to solve this error?

Sincerely,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Feb 16, 2009 11:30 am 
Offline

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
I'm guessing you need to download the mysql headers. What version of groundwork are you using?


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Feb 17, 2009 2:53 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
I'm using Groundwork 5.3.0 Community Edition.

Sincerely,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Feb 17, 2009 4:07 am 
Offline

Joined: Mon Jan 19, 2009 5:44 am
Posts: 42
Location: Barcelona, Spain
Hi guys,

Thanks to you pointing me in a certain direction I got it up and running. Now I can start configuring it.

Thanks again for your support and patience.

Kind regards,

Eric


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 Previous  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:  
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.