collectd is a daemon that gathers system processes, and generates RRD files.
See also CGP for web statistics.
Repository installs:
yum install libpcap-devel
Download and install manually:
Download and install the collectd init script.
On one CentOS install, I was having trouble with collectd's rrdtool library linking correctly. The fix that worked was to install rrdtool with a prefix of /usr.
make.conf changes
COLLECTD_PLUGINS="apache cpu disk iptables logfile mysql processes uptime users swap syslog load conntrack interface memory netlink rrdtool tcpconns vmem df protocols sensors"
Located in /usr/ports/net-mgmt/collectd
echo collectd_enable=YES >> /etc/rc.conf mkdir /var/lib/collectd /usr/local/etc/rc.d/collectd start
Create a new user with proper privileges:
CREATE USER 'collectd'@'localhost' IDENTIFIED BY 'password'; GRANT SELECT, PROCESS, SHOW DATABASES, SUPER ON *.* TO 'collectd'@'localhost'; FLUSH PRIVILEGES;
Some plugins will not work on a VPS because you do not have direct access to the hardware.
Once you start collectd, tail the system logs to make sure everything is okay.