diff --git a/docs/CODING.htm b/docs/CODING.htm deleted file mode 100644 index b5f56dd12c..0000000000 --- a/docs/CODING.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - -
-- -
- -
- -
- -
- -
- -
Before you can create traffic graphs, Cacti must have working SNMP support. One way to do this is to - compile PHP with SNMP support built in, many times you can install the 'php-snmp' package to do this. The - second option is to have Cacti call the snmpget and snmpwalk binaries from your ucd-snmp or net-snmp - installation. You can use the about page to determine whether to are using "built-in" or "external" SNMP - support.
- -Now that you have working SNMP support, follow these steps.
- -- -
Cacti 0.8 and above requires that you have at least PHP 4.1 or greater installed.
-Your installation of PHP does not have MySQL installed or enabled. On binary-based distributions, make sure - you have the 'php-mysql' package installed. Also make sure that 'extension=mysql.so' is uncommented in your - php.ini file.
-To reset the admin account password back to the default of 'admin', connect to your Cacti database at the command line.
- -shell> mysql -u root -p cacti
- -Now execute the following SQL:
- -mysql> update user_auth set password='21232f297a57a5a743894a0e4a801fc3' where username='admin';
-- -
Give cactid, the future replacement for cmd.php a try. Unlike cmd.php, cactid is written in c and makes use - of pthreads. On a typical installation, it is not uncommon for cactid to poll about 500 items in less then 10 - seconds.
-The best thing to do here is to force Cacti to rebuild its poller cache. To do this click "Utilities" - on the Cacti menu, and simply select "Clear Poller Cache".
-Redhat 8.0 comes with a broken php-snmp package. Updating your 'php-snmp' and 'net-snmp' packages to their latest - versions should fix this problem.
-Run snmpconf -g basic_setup and follow the prompts. Also check that the file being used by snmpd is the correct - config file. For Redhat Linux, snmpconf creates the /etc/snmpd.conf, but snmpd uses /etc/snmpd/snmpd.conf.
- -If this doesn't work a very simple config file is:
- -# contact
- syslocation Something
- syscontact "root@someone.com"
-
- # auth
- rocommunity public
-
- # disk monitoring
- disk /
- -
For you to actually get graph images, cmd.php must run at least once so it can create .rrd files in Cacti's - 'rra/' directory. Double check that you configured your /etc/crontab file to execute cmd.php every five minutes. - Also make sure that the user cmd.php runs as has permission to create new files in Cacti's 'rra/' directory.
- -If all of your settings appear correct, try running cmd.php manually by cd'ing to Cacti's directory and typing:
- -shell> php cmd.php
- -If you have files in your 'rra/' directory, but your graphs still appear as broken images, you should enable - graph debug mode see exactly why the graphs are not rendering. To do this go into Cacti, select "Graph Management" - from the menu, select any graph listed, and select "Turn On Graph Debug Mode".
-More often than not, this problem's cause is permissions. For instance if you run cmd.php manually as root for - testing, any .rrd files that it creates will be owned by root. Now when cmd.php runs from cron, it will not be - able to update these .rrd files because they are owned by root. You can double check the owner of your .rrd files - by running the following command in your Cacti directory:
- -shell> ls -al rra/
- -If only some of your graphs are not updating correctly, double check the "Maximum Value" field for all data - sources used by these graphs. If the value being fed to the .rrd file exceeds its "Maximum Value", RRDTool will insert - an "Unknown" and you will see no data on the graph.
-Cacti does this by default to better control graph title formatting. You can change this limit, by going to "Cacti - Settings" on the Cacti menu, selecting the "Visual" tab, and changing the value for "Data Queries - Maximum Field Length".
-This occurs because the reboot causes SNMP's counters to reset, which can cause a rather large spike on the graph - when RRDTool tries to determine the change between the new small counter value and the large previous value. One way to - combat this issue is to specify realistic maximum values for your data sources. RRDTool will ignore any value that is larger - than the maximum value.
- -If you already have a spike on one or more of your graphs, there is a really - useful Perl script that will remove them for you.
-- -
Contrary to previous versions of Cacti, you must not put Cacti in your PHP include path. Check your php.ini file to make - sure there is not something like 'include_path = C:/Apache2/htdocs/cacti'. -
- -
- -Cacti requires: -
MySQL 3.23 or newer.
- http://www.mysql.com/downloads/mysql-3.23.html mysql-3.23.56-win.zip
- -
- -
- -
- -
- -
- -
- -
- -
extension_dir = c:/php/extensions
- extension=php_snmp.dll
- session.save_path=c:\tmp
- - Make sure to replace c:/webroot/cacti with your full path to cacti.
-
- -
- -
- -
LoadModule php4_module c:/php/sapi/php4apache.dll
- AddModule mod_php4.c
- AddType application/x-httpd-php .php
- DirectoryIndex index.html index.htm index.php
- -
- -
LoadModule php4_module c:\php\sapi\php4apache2.dll
- AddType application/x-httpd-php .php
- DirectoryIndex index.html index.htm index.php
- -
- -
- -
- -
- -
- -
- -
net stop iisadmin
- net start w3svc
- -
- -
- -
- -
- -
- -
C:\> cd mysql\bin
- C:\MySQL\bin> mysqladmin password 'password'
- C:\MySQL\bin> mysqladmin --user=root --password reload
- -
C:\MySQL\bin> mysqladmin --user=root --password create cacti
- -
C:\MySQL\bin> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
- -
C:\MySQL\bin> mysql --user=root --password mysql
- mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
- mysql> flush privileges;
- -
- -
- -
- -
Specify the MySQL user, password and database for your cacti configuration.
$database_default = "cacti";
- $database_hostname = "localhost";
- $database_username = "cactiuser";
- $database_password = "cacti";
-
Change the operating system variable to "win32" (already done for win32 distribution):
$config["cacti_server_os"] = "win32";
- - You are going to have to enter the full command line in the Run textbox. Using default paths, - your command line should look something like:
- -
c:\php\php.exe c:\apache2\htdocs\cacti\cmd.php
- -Select the Schedule tab and click Advanced. Check the Repeat task checkbox - and change it to every 5 minutes, then change the Duration to 24 hours. That should - schedule cmd.php to run every 5 minutes.
- -- -
http://your-server/cacti/- -
Log in the with a username/password of admin. You will be required to - change this password immediatly. Using the default paths described in this document, your - paths should look something like:
- -PHP Binary Path:
- -c:/php/php.exe
- -rrdtool Binary Path:
- -c:/rrdtool/rrdtool.exe
- -cacti Web Root:
- -/cacti
- -Apache Web Root:
- -c:/apache2/htdocs
-- -
- -Cacti requires: -
-
- -
- -
-
- -
- -
- -
shell> tar xzvf cacti-version.tar.gz
- -
shell> mysqladmin --user=root create cacti
- -
shell> mysql cacti < cacti.sql
- -
shell> mysql --user=root mysql
- mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
- mysql> flush privileges;
- -
Specify the MySQL user, password and database for your cacti configuration.
$database_default = "cacti";
- $database_hostname = "localhost";
- $database_username = "cactiuser";
- $database_password = "cacti";
-
- -
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for - data gathering.)
- -- -
*/5 * * * * cactiuser php /var/www/html/cacti/cmd.php > /dev/null 2>&1
- -- -
http://your-server/cacti/- -
Log in the with a username/password of admin. You will be required to - change this password immediatly. Make sure to fill in all of the path variables carefully - and correctly on the following screen.
-- -
- -
- -
shell> mysqldump cacti > mysql.cacti
- -
shell> mv cacti cacti_old
- -
shell> tar xzvf cacti-version.tar.gz
- -
shell> mv cacti-version cacti
- -
shell> cp cacti_old/rra/* cacti/rra/
- -
Specify the MySQL user, password and database for your cacti configuration.
$database_default = "cacti";
- $database_hostname = "localhost";
- $database_username = "cactiuser";
- $database_password = "cacti";
-
- -
shell> chown cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for - data gathering.)
- -- -
http://your-server/cacti/- -
Make sure to fill in all of the path variables carefully - and correctly on the following screen.
-