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: Tue Feb 17, 2009 5:03 am 
Offline

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

Back again with another 'problem'. I got Cacti installed thanks to your help but now my server is running three instances of agent.bin and those three combined take up 99% of the CPU. Is this something that looks familiar to you in regards to the Cacti installation? What am I missing in my config? I don't assume it's normal.

Thanks for your reactions and help.

Kind regards,

Eric


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

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

An additional problem in Cacti/Groundwork combination:

I'm not getting any graphs. Been browsing in forums and on the internet, tried a lot of 'solutions' but without results.

this is what Cacti says when I debug it:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Disk Space - /dev/sda1" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes" \
DEF:a="/usr/local/groundwork/apache2/htdocs/cacti/rra/localhost_hdd_free_8.rrd":hdd_used:AVERAGE \
DEF:b="/usr/local/groundwork/apache2/htdocs/cacti/rra/localhost_hdd_free_8.rrd":hdd_free:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
CDEF:cdefi=TIME,1234888204,GT,a,a,UN,0,a,IF,IF,TIME,1234888204,GT,b,b,UN,0,b,IF,IF,+,1024,* \
AREA:cdefa#F51D30:"Used" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefe#002A97:"Available" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefi#000000:"Total" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n"

RRDTool Says:

ERROR: opening '/usr/local/groundwork/apache2/htdocs/cacti/rra/localhost_hdd_free_8.rrd': No such file or directory

Ring any bells? I'm really lost out here.

Hoping you guys can help out.

Kind regards,

Eric


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

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

I think I might have found a problem in my configuration that's causing Cacti not to render the graphs.

When I look at the include/config.php it states that the MySQL server is localhost, but don't I have to mention the socket there also in some way? Thing is I can only connect to MySQL using the -S option that points to the socket.

If so can you tell me how I can mention the socket in the php file?

Kind regards,

Eric


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

Joined: Sun Mar 11, 2007 8:53 pm
Posts: 179
I'm not sure what the agent.bin is, it's not any part of cacti.

As for your config.php, there should be a an entry in there like:
Code:
$database_port = "3306";


you might double check and make sure nothing got deleted in there.

Double check your permissions on the RRD files & folders, make sure they are readable by the nagios user. Some things have changed with the 5.3 release of groundwork, I'm still on 5.2, so the instructions for cacti installation might not be the same.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Feb 18, 2009 12:38 am 
Offline

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

I'm not sure what I've done but I got my graphs!!! When I went to Graph Management and put it in Debug mode, I could copy/paste the command used to make the graph in the console as a regular user. Doing this the graph was created perfectly. So I started checking versions and in the Setting of Cacti the version was set to 1.0 and I have 1.2 installed.
After changing that one setting all at once the graphs are showing as should.

That leaves me only with one problem. I've been watching at my screen for something to happen but the graphs stay empty. So I checked the poller which runs as a root cronjob:

*/5 * * * * root /usr/local/groundwork/php/bin/php /usr/local/groundwork/apache2/htdocs/cacti/poller.php > /dev/null 2>&1

When I try to run that command manually as root I get the error:

FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'. I've checked and double-checked those settings and they are correct.

Logged in as root I can access the MySQL only with password (mysql -p --user=root). When I use the cactiuser with password (mysql -p --user=cactiuser). I can also connect (only having cacti database). I even changed the config.php of cacti to use root as mysql user with the correct password but still no result.

When running the poller.php or cmd.php from the command line I always get the same error that the user cannot connect to MySQL server on 'localhost'.

Any suggestions how I might be able to solve this, since I think that's the only thing missing to have my graphs showing actual data.

Thanks in advance.

Kind regards,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Mar 02, 2009 2:20 am 
Offline

Joined: Mon Mar 02, 2009 2:11 am
Posts: 1
Hi,

I had similar problem, but after i changed my database_hostname values in config.php, it works!

$database_hostname = "localhost";
to
$database_hostname = "127.0.0.1";


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Mar 02, 2009 2:28 am 
Offline

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

Thanks for your reply, I've tried that and it didn't provide a solution to my problem. At this time I have given up on integrating Cacti into Groundwork. I've installed MRTG and it's working like a charm. The only thing I'm looking for is how to show that page in the Groundwork site. I have the link but nothing gets shown, I get an error. Any idea how to link to a webpage in Groundwork (the mrtg page is on the same server). I've posted this question but apparently it's quite a problem since I haven't received an answer yet :-)

Kind regards,

Eric


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Mar 02, 2009 7:42 am 
Offline
Site Admin
User avatar

Joined: Thu Oct 12, 2006 6:39 am
Posts: 1126
Location: Charlotte, NC
try testing like this from the command line


mysql -u cactiuser -p -h localhost
if that doesn't work you might have to assign rights to explitely to the cactiuser at localhost, something like;

mysql
> grant all on cactidb.* to 'cactiuser'@'localhost' identified by 'cactiuserps';


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Fri Mar 13, 2009 8:14 am 
Offline

Joined: Sun Mar 08, 2009 5:09 am
Posts: 3
I seem to have the same problem with rrdtool, which isn't creating any graph. I found some files created in /usr/local/groundwork/rrd but they appear to be several days old. The poller is running properly, running it manually returns this:

Code:
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
03/13/2009 04:29:33 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceed
03/13/2009 04:29:33 PM - SYSTEM STATS: Time:293.4382 Method:cmd.php Processes:1

Warning: pclose(): 48 is not a valid stream resource in /usr/local/groundwork/ap

real    4m53.810s
user    0m0.176s
sys     0m0.588s


I found out that the binary paths differ in GW 5.3. I changed them in the Cacti settings to:

Code:
/usr/local/groundwork/common/bin/snmpwalk
/usr/local/groundwork/common/bin/snmpget
/usr/local/groundwork/common/bin/snmpbulkwalk
/usr/local/groundwork/common/bin/snmpgetnext
/usr/local/groundwork/common/bin/rrdtool
/usr/local/groundwork/share/rrdtool/fonts
/usr/local/groundwork/php/bin
/usr/local/groundwork/apache2/htdocs/cacti/log/cacti.log


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Mar 24, 2009 10:28 pm 
Offline

Joined: Thu Jan 22, 2009 8:23 am
Posts: 5
I spent many hours going through the trials and tribulations to make this work, particularly with recompiling PHP. Everything seems to be work, BUT I'm not getting any graphs. I see RRD files in /usr/local/groundwork/rrd, and it appears the poller is working. But just no graphs. In /usr/local/groundwork/apache2/htdocs/cacti/rra/ there is nothing but a .placeholder file

There is also a /usr/local/groundwork/apache2/htdocs/rrd path that doesn't contain anything.

Any help would be appreciated. I'll probably try and run this by the folks in the Cacti forums as well.

I am using GWMCE 5.3 and Cacti 0.87.d. I did set the paths to use the tools in the Groundworks paths (i.e. /usr/local/groundwork/common/bin/snmpwalk, etc.). I'm using the rrdtool that was installed with GWMCE 5.3, although it appears I also have rrdtool installed in /usr/bin

I went in and changed ownership of all the directories related to cacti (i.e. /usr/local/groundwork/apache2/htdocs/cacti/) to the nagios user
This didn't seem to correct the problem.

I'm also not getting anything in the cacti.log file.

All of this is running on Suse Linux Enterprise Server 10.

Thank you in advance.

Regards,
Chris


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Tue Mar 24, 2009 11:29 pm 
Offline

Joined: Thu Jan 22, 2009 8:23 am
Posts: 5
Update:
Problem seems to be PHP and/or MySQL related.

When I run the poller manually
php /usr/local/groundwork/apache2/htdocs/cacti/poller.ph

The following is returned at the bottom of the output:

/usr/local/groundwork/apache2/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php
Missing file: /usr/local/groundwork/apache2/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php
<p>ADONewConnection: Unable to load database driver ''</p>
Fatal error: Call to a member function PConnect() on a non-object in /usr/local/groundwork/apache2/htdocs/cacti/lib/database.php on line 43

I checked and the file in question is not missing.

Looking forward to any help that can be afforded. Thanks in advance.

Chris


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Apr 02, 2009 4:03 pm 
Offline

Joined: Wed Apr 01, 2009 4:07 pm
Posts: 1
Hi I still have problem when I ran the folliwng command
'./configure' '--prefix=/usr/local/groundwork/php' '--with-apxs2=/usr/local/groundwork/apache2/bin/apxs' '--with-iconv=/usr/local/groundwork/common' '--with-libxml-dir=/usr/local/groundwork/common' '--with-expat-dir=/usr/local/groundwork/common' '--with-mysql=/usr/local/groundwork/mysql' '--with-zlib-dir=/usr/local/groundwork/common' '--enable-mbstring=all' '--enable-soap' '--enable-bcmath' '--enable-ftp' '--with-xmlrpc' '--enable-fastcgi' '--enable-force-cgi-redirect' '--with-gettext' '--with-mod_charset' '--enable-safe-mode' '--with-ldap=/usr/local/groundwork/common' '--enable-spl' '--with-regex=php' '--disable-ipv6' '--enable-session' '--enable-calendar' '--enable-ctype' '--with-freetype' '--enable-bcmath' '--with-snmp=/usr/local/groundwork/common' '--enable-ucd-snmp-hack' '--with-gd=/usr/local/groundwork/common'


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!

how to install mysql header files?


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Mon Apr 06, 2009 2:08 am 
Offline

Joined: Mon Apr 06, 2009 2:05 am
Posts: 2
Hello.

I have installed the GM 5.3.0 on Ubuntu x64.

I have tried to install cacti as on page 1. But if I call
http://<server>/cacti/install it went to a page called http://<server>.com/...

So I tried it with the GM and wrappit.
And now... I have the same problem with the mysql header files.
Any news?

Kind regards,

Rolf


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Wed Apr 08, 2009 2:43 am 
Offline

Joined: Tue Apr 07, 2009 11:52 pm
Posts: 8
emai wrote:
Hi I still have problem when I ran the folliwng command
'./configure' '--prefix=/usr/local/groundwork/php' '--with-apxs2=/usr/local/groundwork/apache2/bin/apxs' '--with-iconv=/usr/local/groundwork/common' '--with-libxml-dir=/usr/local/groundwork/common' '--with-expat-dir=/usr/local/groundwork/common' '--with-mysql=/usr/local/groundwork/mysql' '--with-zlib-dir=/usr/local/groundwork/common' '--enable-mbstring=all' '--enable-soap' '--enable-bcmath' '--enable-ftp' '--with-xmlrpc' '--enable-fastcgi' '--enable-force-cgi-redirect' '--with-gettext' '--with-mod_charset' '--enable-safe-mode' '--with-ldap=/usr/local/groundwork/common' '--enable-spl' '--with-regex=php' '--disable-ipv6' '--enable-session' '--enable-calendar' '--enable-ctype' '--with-freetype' '--enable-bcmath' '--with-snmp=/usr/local/groundwork/common' '--enable-ucd-snmp-hack' '--with-gd=/usr/local/groundwork/common'


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!

how to install mysql header files?


Emai, you should download the MySQL source from www.mysql.org to have headers available, preferably the same version of the MySQL pre-installed. Anyhow, you don't need to recompile MySQL, just point the PHP configure option "--with-mysql" to the untarred MySQL source's directory.


Back to top
 Profile  
 
 Post subject: Re: Add Cacti to Groundwork
PostPosted: Thu Apr 09, 2009 9:43 pm 
Offline
User avatar

Joined: Thu Apr 09, 2009 9:14 pm
Posts: 3
stan_county wrote:
I spent many hours going through the trials and tribulations to make this work, particularly with recompiling PHP. Everything seems to be work, BUT I'm not getting any graphs. I see RRD files in /usr/local/groundwork/rrd, and it appears the poller is working. But just no graphs. In /usr/local/groundwork/apache2/htdocs/cacti/rra/ there is nothing but a .placeholder file

There is also a /usr/local/groundwork/apache2/htdocs/rrd path that doesn't contain anything.

Any help would be appreciated. I'll probably try and run this by the folks in the Cacti forums as well.

I am using GWMCE 5.3 and Cacti 0.87.d. I did set the paths to use the tools in the Groundworks paths (i.e. /usr/local/groundwork/common/bin/snmpwalk, etc.). I'm using the rrdtool that was installed with GWMCE 5.3, although it appears I also have rrdtool installed in /usr/bin

I went in and changed ownership of all the directories related to cacti (i.e. /usr/local/groundwork/apache2/htdocs/cacti/) to the nagios user
This didn't seem to correct the problem.

I'm also not getting anything in the cacti.log file.

All of this is running on Suse Linux Enterprise Server 10.

Thank you in advance.

Regards,
Chris


I successfully integrated Cacti in to GWCE 5.2.1 but now I have carried out a fresh install of 5.3.0 (Centos 5.2) I have exactly the same problem, same scenario for me........

Installed the PHP/MySQL devel files. Complied PHP 5.2.6 with sockets.
Cacti 0.8.7d installed and integrated into Groundwork with wrappit.
All paths and permissions set as above.

Nothing in the cacti log fil at all
No graphs in rra/
I run the poller manually (in debug mode) and there is no error output.


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.