
Among opensource monitoring softwares, Cacti is a reference. This software is divided into 2 parts : a front office, i.e. a graphical user interface declined as a website but also a tool which works periodically to get datas from others servers / services.
Cacti 's goal is to collect numeric infromation about servers and services health and represent them as charts.
To work, cacti needs PHP, an application server as httpd by the Apache foundation, a databases server (MySQL) to store set-up and rrdtool to backup collected datas.
Cacti 's installation has several step but is quiet simple :
- rrdtool installation
- PHP installation and setting up
- Cacti's installation
- httpd setting up
- Data collector installation
rrdtool installation :
There are 2 ways to install rrdtool via the package manager or by compiling it.
Here, we compile it because the version (1.2.11) provided by the package manager is bugged for data representation and we prefere the 1.2.29 version :
PHP installation and setting up :
We work on the assumption that a httpd server and a MySQL server are already installedsont déjà installés (respectively into /usr/local/apache2 and /usr/local/mysql).
Now, we install PHP with some modules :
Cacti's installation :
Cacti is a repository providing the website application but also data collector scripts.
Now, we have to set up the database creating a dedicated database and giving rights to a new MySQL user :
Creating the database's tables :
Then, the cacti's set up to connect to the databases server. Just edit the /usr/local/cacti/include/config.php file and adapt it depending the environment :
httpd setting up :
The website set-up under httpd is easily made adding in the httpd.conf or httpd-vhost.conf file :
After an httpd restart (/usr/local/apache2/bin/apachectl restart) or a set-up reloading (/usr/local/apache2/bin/apachectl graceful), just connect to the cacti'sinterface (http://localhost/cacti).
When authenticating (by default with admin / admin), the interface asks to change password (recommended) then cacti is fully operational with a basic set-up for data collection.
Path to tools can be bad (for example rrdtool path if as here you have compiled it into a specific repository). To correct this, just indicate the right path to binaries.
Data collector installation :
Now, the visual cacti aspect is done, we have to install the data collector.
This program is very simple because it is a PHP script to install in the crontab (i.e. in the generic file /etc/crontab or in a user's crontab with the crontab -e command) :
It's finished. Here, all 5 minutes, the data collector will be triggered all datas will be stored under the rrd format.
Articles similaires
| Comments |
|
|
|||||||||||
|
|||||||||||
|
|||||||||||














