Get metrics from cacti service in real time to:
- Visualize and monitor cacti states
- Be notified about cacti failovers and events.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
The Cacti check is included in the Datadog Agent package, to start gathering metrics you first need to:
- Install librrd headers and libraries
- Install python bindings to rrdtool
On Debian/Ubuntu
sudo apt-get install librrd-devOn RHEL/CentOS
sudo yum install rrdtool-develNow add the rrdtool Python package to the Agent with the following command.
sudo -u dd-agent /opt/datadog-agent/embedded/bin/pip install rrdtoolCreate a datadog user with read-only rights to the Cacti database
sudo mysql -e "create user 'datadog'@'localhost' identified by '<password>';"
sudo mysql -e "grant select on cacti.* to 'datadog'@'localhost';"Check user and rights
mysql -u datadog --password=<password> -e "show status" | \
grep Uptime && echo -e "\033[0;32mMySQL user - OK\033[0m" || \
echo -e "\033[0;31mCannot connect to MySQL\033[0m"
mysql -u datadog --password=<password> -D cacti -e "select * from data_template_data limit 1" && \
echo -e "\033[0;32mMySQL grant - OK\033[0m" || \
echo -e "\033[0;31mMissing SELECT grant\033[0m"Configure the Agent to connect to MySQL, edit your cacti.d/conf.yaml file. See the sample cacti.d/conf.yaml for all available configuration options:
init_config:
instances:
- mysql_host: localhost
mysql_user: datadog
mysql_password: hx3beOpMFcvxn9gXcs0MU3jX
rrd_path: /path/to/cacti/rra
#field_names:
# - ifName
# - dskDevice
# - ifIndex
#rrd_whitelist: /path/to/rrd_whitelist.txtGive the datadog-agent user access to the RRD files
sudo gpasswd -a dd-agent www-data
sudo chmod -R g+rx /var/lib/cacti/rra/
sudo su - datadog-agent -c 'if [ -r /var/lib/cacti/rra/ ];
then echo -e "\033[0;31mdatadog-agent can read the RRD files\033[0m";
else echo -e "\033[0;31mdatadog-agent can not read the RRD files\033[0m";
fi'Run the Agent's status subcommand and look for cacti under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
The Cacti check does not include any events.
The Cacti check does not include any service checks.
The Python library used by this integration leaks memory under certain circumstances. If you experience this, one workaround is to install the python-rrdtool package instead of rrdtool. This older package is not maintained and is not officially supported by this integration but it has helped others resolve the memory issues.
A Github issue has been opened to track this memory leak.
Need help? Contact Datadog support.