A short overview of the Cacti CLI functionality
As you've learned in previous chapters, Cacti comes with several CLI scripts suitable for some of Cacti's maintenance tasks. The CLI scripts can be found in the cli directory of base Cacti installation.
The cli
directory contains two repair scripts which you may want to use in case of database corruption or template errors and you do not want to lose all the configuration data since your last backup.
Repairing templates
It may happen that some of the data or graph templates have errors. You can then try to repair these templates by using the repair_templates.php
script. Issue the following command to check for errors. Using the -execute
parameter will try to fix any errors shown:
cd /var/www/html/cacti/cliphp repair_templates.php
The following output will be shown on a working system:
Repairing the database
Cacti also provides a repair utility for checking and repairing the database structure. Using the repair_database.php
script may save you from...