Spend the weekends trying to get Cacti up and running on this VPS. Apparently since this VPS is using WHM on CentOS, there are some packages like Apache, PHP, MYSQL, Perl, Ruby installed directly but not indicated as installed via Yum and hence it is failing dependency check when trying to install rrdtool.
What is Cacti
Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installation templating s up to complex networks with hundreds of devices.
What is RRDtool
RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. RRDtool can be easily integrated in shell scripts, perl, python, ruby, lua or tcl applications.
Spent almost the whole day trying to get that installed but to no avail. Found this tutorial, Install RRDTool on Red Hat Enterprise Linux, followed it and I managed to get rrdtool up and running.
Next was the easy step which is to download Cacti and upload it to this server. PHP and MYSQL is needed to run Cacti and hence you need to create a MYSQL database and account for Cacti.
Once that is done, remember to import the existing database data/structure in cacti.sql into the database, if not you will get segfault errors when accessing your Cacti.
You will also need to create a cron job that runs once every 5 minutes to populate contents for Cacti, refer to Install and Configure Cacti.
Now what you need are templates/graphs to monitor your Apache, MYSQL, Memcached and even your server. For Apache and MYSQL you can use mysql-cacti-templates, even for Memcached, you can use that, but personally I am using memcached Cacti Template.
Remember that each scripts you download requires configuration in the script itself.
- For memcached, you need to enter your memcached IP and Port.
- For Apache, you need to have SSH account setup and mod_status compiled and ExtendedStatus set to On. By default, mod_status is compiled in all WHM installations.
- For MYSQL, you need to enter your MYSQL credentials.
Everything is up and running, now it is the time to create a custom graph if you want, you can take a look at Making Your Scripts Work With Cacti.
I created a custom script to pull the number of usersonline on my site via my WordPress WP-UserOnline plugin and populate it in Cacti.
If you are using iPhone/iPad, there is also an app for it called iCacti (Universal App) which cost US$3.99. I bought it instantly when I discovered that there is an app for Cacti. Works well with https/http auth and normal login.
Blog – UsersOnline (Custom)
Server – Load Average
Apache – Requests
MYSQL – Command Counters
Memcached – Requests Per Second