This article covers how to add a #Linux host to #Cacti.
Basically, Cacti is a network #monitoring device that creates personalized graphs of server efficiency.
SNMP, short for Simple Network Management Protocol is a protocol used for gathering information about devices in a network. Using SNMP, you can poll metrics such as CPU utilization, memory usage, disk utilization, network bandwidth, and so on.
To install snmp agent on Ubuntu, run the command:
$ sudo apt install snmp snmpd -y
To install #snmp agent On CentOS 8, run the command:
$ sudo dnf install net-snmp net-snmp-utils -y
SNMP starts automatically upon installation.
To confirm this, confirm the status by running:
$ sudo systemctl status snmpd
If the service is not running yet, start and enable it on boot as shown:
$ sudo systemctl start snmpd
To Add Remote Linux Host to Cacti for Monitoring:
1. Install SNMP service on Linux hosts. SNMP, short for Simple Network Management Protocol is a protocol used for gathering information about devices in a network.
2. Configuring SNMP service.
3. Configure the firewall rules for snmp.
4. Adding remote Linux host to Cacti.
To Install and Configure Cacti:
1. Cacti require few more dependencies, run the following command to install them:
yum -y install net-snmp rrdtool net-snmp-utils
2. As we have all the dependencies ready, we can now download the install package from Cacti website.
3. You can always find the link to the latest version of the application on Cacti download page. Extract the archive using the following command.
tar xzvf cacti*.tar.gz
4. Rename your Cacti folder using:
mv cacti-1*/ cacti/
5. Now import the Cacti database by running the following command.
mysql cacti_data < cacti.sql -u root -p
6. The above command will import the cacti.sql database into cacti_data using the user root.
It will also ask you the password of root user before importing the database.
7. Now edit Cacti configuration by running the following command.
8. Now find the following lines and edit them according to your MySQL database credentials.
/* make sure these values reflect your actual database/host/user/password */
$database_type = 'mysql';
$database_default = 'cacti_data';
$database_hostname = 'localhost';
$database_username = 'cacti_user';
$database_password = 'StrongPassword';
$database_port = '3306';
$database_ssl = false;