Cacti On Centos

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Well, the issue with yum (CentOS/RedHat) and apt(Debian/Ubuntu) is that the maintainer of the yum/apt packages adapt the Cacti files to match the normal Linux behaviour.

That is, config files go to /etc, HTML files to /var/www ...

So it differs to the tgz source file, where everything is just underneath the root directory ( usually in /var/www/html or /var/www/html/cacti ). In fact, I have no idea where the yum version you installed did put the plugins directory to. It should have been created underneath /var/www/html/plugins or /var/www/html/cacti/plugins, but as you described it did not.

So the source installation is far easier to support.

Back to the question, yes, just extract it, configure the basic stuff (create database, database user, load database sql file, edit/change config.php ) as described in the install guides.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

can someone explain to me what this command does

mysql -p cacti > /var/www/html/cacti/cacti.sql

I know it goes to cacti directory and looks at file cacti.sql but what does mysql -p cacti mean

the reason i ask is because I enter in this command
get a prompt to enter in the mysql admin password and i do enter in the mysql admin password; but I do not receive a sucessful prompt that the command was entered or ran correctly...
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

That command imports the database structure into the cacti database, which you probably created a step earlier.

But it should be :

Code: Select all

mysql -p cacti < /var/www/html/cacti/cacti.sql
If you called that ther command already, you probably need to restore the cacti.sql file from the downloaded archive as it may be empty now.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Greetings,

After performing the recommended procedures from the Cacti on Centos 6.02 install, I am getting the following 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 vi /var/www/html/cacti/include/config.php and verified the DB password was correct and which it is... Is there something I am over looking??

Many Thanks
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Maybe the mysql server isn't running.

Do a

Code: Select all

/etc/init.d/mysqld restart
and

Code: Select all

chkconfig mysqld on
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

I forgot to mention, I checked the services with the service --status-all command and the services listed below are running
on my linux server

httpd
mysqld
crond
snmpd
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Hm,

The only thing I could think of is this part which may be missing:

Code: Select all

GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'MyV3ryStr0ngPassword';
flush privileges;
exit
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Ok I have two issues.

Issue Number 1 is, I notice that my devices are not showing any graphs for my devices. After noticing there were no graphs present, I immediated went to /var/www/html/cacti and re-applied the chmod 755 to the log and rra file and I also cd /rra directory and noticed no files were being generated. The chmod command did not correct my graphing issue.

Issue Number 2 is I am unable to send an test email from the Mail/DNS page. At first I thought the iptables settings were blocking port 25; therefore, I permitted tcp port 25 in the iptables settings and restarted the iptables service. This did not resolve my problem as well. Each time I try to send a test email I get the following error

ERROR: Unable to connect to SMTP Host '66.207.227.26': (13) Permission denied
Unable to connect to SMTP Host '66.207.227.26': (13) Permission denied

Can someone assist me with these two issues...
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

For the first issue: Do you have setup the cron job, and if yes, it is running regularly ( see /var/log/cron ).

The seconde one: Do you have selinux enabled ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Ok changing the selinux from enabled to permissive, appears to have corrected my email and graph collecting issue.

I will have more questions; but, I need to add as well determine what does or does not need to be monitored.

Many Thanks
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

In case you want to re-enable selinux. the commands necessary for Cacti to work properly are listed here:

http://docs.cacti.net/manual:088:1_inst ... x_settings
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

After shutting down my server on yesterday evening, I notice I am no longer recieving alerts regarding the nodes I monitor. I also notice that cron has stopped graphing these nodes. It appears cron stopped graphing on yesterday around 1230.

I have rebooted the server as well can confirm the following services are running:

crond is running
httpd is running
mysqld is running
Selinux is set to disabled

iptables permit the following
tcp ports 22,80,25,23
udp port 161

Can someone assist me with why the server has stopped graphing and sending out automated emails. One more thing, I am able to send test emails without any issues whatsoever...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti On Centos

Post by gandalf »

Find more hints at 2nd link of my sig
R.
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

What are you saying... I am lost
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti On Centos

Post by gandalf »

When logging into the forum, find any of my post. There's a signature below. 2nd link points to the debugging guide
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests