Cacti on Solaris 10
Moderators: Developers, Moderators
Cacti on Solaris 10
Hi
I'm in the process of migrating our cacti installation from an old Linux server to a SunFire V120 server running Solaris 10 and I was wondering if anyone has an idiots guide to getting everything working. I'd like to run SPINE and Boost to ensure good poll times as on the Linux machine with boost running the poll time is still around 280 seconds.
Any help greatly appreciated!!
I'm in the process of migrating our cacti installation from an old Linux server to a SunFire V120 server running Solaris 10 and I was wondering if anyone has an idiots guide to getting everything working. I'd like to run SPINE and Boost to ensure good poll times as on the Linux machine with boost running the poll time is still around 280 seconds.
Any help greatly appreciated!!
I've done it several times, both sparc and i386.
The hardest part is getting apache+php+rrdtool built with all of the goodies.
Here's a dump of my notes:
The hardest part is getting apache+php+rrdtool built with all of the goodies.
Here's a dump of my notes:
Code: Select all
# add cacti user, put in html group
sudo groupadd -g 73 html
sudo useradd -s /bin/sh -d /data/html/cacti/htdocs \
-c "Cacti Pseudo-User" -g 73 -u 75 cacti
# unlock account by giving some random password
sudo passwd cacti
populate cacti web area
(download from http://www.cacti.net/downloads )
add virtualhost entry
bring/restart up apache
mysqladmin --user=root -p create cacti
mysql --user=root -p cacti < /data/html/cacti/htdocs/cacti.sql
mysql --user=root -p mysql
mysql> GRANT ALL on cacti.* TO cactiuser@localhost IDENTIFIED BY 'mypass';
mysql> flush privileges;
sudo nvi ~cacti/include/config.php
==== ====
--- config.php.FCS 2008-05-01 19:34:18.220920000 -0400
+++ config.php 2008-05-01 19:34:33.134819000 -0400
@@ -27,7 +27,7 @@
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
-$database_password = "cactiuser";
+$database_password = "mypass";
$database_port = "3306";
/* Default session name - Session name must contain alpha characters */
==== ====
sudo chown -R cacti ~cacti/{rra,log}
verify memory_limit=128M in php.ini (/opt/webserver/etc/php.ini for me)
sudo nvi ~cacti/poller.php
==== ====
--- poller.php.FCS 2008-05-01 20:04:08.569064000 -0400
+++ poller.php 2008-05-01 20:04:18.927736000 -0400
@@ -1,3 +1,4 @@
+#!/opt/webserver/bin/php -q
<?php
/*
+-------------------------------------------------------------------------+
==== ====
sudo chmod a+x /data/html/cacti/htdocs/poller.php
hit the cacti site with browser
change all /usr/local entries to new location (/opt/webserver for me )
log into cacti
settings tab
general
rrdtool utility version = 1.2.x
snmp version = version 2
[save]
poller
downed host detection = ping and snmp
[save]
visual
default rrd 1.2 fonts
title font size = 10
legend font size = 8
axis font size = 8
unit font size = 8
# make test pass
sudo -u cacti ~cacti/poller.php
cat ~cacti/log/cacti.log
set up crontab entry for cacti
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /data/html/cacti/htdocs/poller.php > /dev/null 2>&1
import Solaris and/or other unix templates
( see http://forums.cacti.net/about11634.html )
( I built my own, but ones in this thread should suffice )
devices tab
whack localhost entry
(too linux-specific to be useful)
new graphs tab
enter local machine info (use snmp)
create graphs for this host
Oh, another thing. If you're used to linux/*BSD and put */5 in the crontab file, it won't work. Yours needs to look like this:
To debug, you can get creative:
(Note the >> in the redirect)
Code: Select all
: myserver; sudo crontab -l cacti
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /data/html/cacti/htdocs/poller.php > /dev/null 2>&1
Code: Select all
: myserver; touch /tmp/cacti.out
: myserver; chmod a+rw /tmp/cacti.out
(edit your crontab to look like):
: myserver; sudo crontab -l cacti
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /data/html/cacti/htdocs/poller.php >> /tmp/cacti.out 2>&1
Who is online
Users browsing this forum: No registered users and 0 guests