Gathering server statistics: collectd

Configuration

by ross at 02:39:40 on May 9, 2012

Install

# cd /usr/ports/net-mgmt/collectd
# make install clean
# rehash

Options for collectd:

  • Optionally check APACHE
  • Optionally check MYSQL
  • Optionally check MEMCACHED
  • Optionally check PGSQL
  • Uncheck SNMP

Create collectd user

# pw groupadd collect
# pw useradd collectd -g collectd -m -s /sbin/nologin
# mkdir -p /home/collectd/data

Configuring Apache

Create /usr/local/etc/apache22/Includes/mod_status.conf:

ExtendedStatus on

<Location /mod_status>
  SetHandler server-status
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Location>
# service apache22 restart

Configuring MySQL

Open phpMyAdmin, click Privileges -> Add user. Add user collectd with access from localhost only, no password, no database, no rights.

Comments