Fork me on GitHub
Monitorix logo

欢迎来到 Monitorix 项目


Installing Monitorix 3.4.0 on a FreeBSD 10-STABLE/amd64 with built-in HTTP server

Many thanks to Darryl Yeoh Gim Hong for sending me the following HOWTO:

# Installing Monitorix 3.4.0 on FreeBSD 10-STABLE/amd64 with built-in HTTP server.
# Main Webpage:
# Documentation:
# Guide written by Darryl Yeoh <>
# NOTE: This howto is in no way perfect. It was written as I installed the latest release of Monitorix on a freshly
# updated FreeBSD 10-STABLE system. If you get into trouble while following this guide, feel free to drop me a mail
# and I will update this guide again.
# $LOG_FILE = '/var/log/monitorix, /var/log/monitorix-httpd' <- This would be the 1st place to look at if you run into trouble.


A cool new feature in Monitorix 3.0.0 and above is it's own built-in HTTP server. This makes the setup much easier.
You only need to install the Monitorix port and that's it.

I'm installing this on a mail server running Postfix. My setup will only be monitoring the following:-

 - Users
 - Network
 - Postfix

If you are monitoring other services, just enable/disable what you want to monitor in the configuration file.


Prepare a subdomain dedicated to Monitorix. I will be using in this guide.


On FreeBSD 10, the ports system has changed quite abit. It is recommended to use Subversion to update your ports tree.
Do that first before anything else. A custom version of Subversion is already in the FreeBSD base system called 'svnlite'.
It's usage is similar to the normal Subversion you install from ports.

When installing the ports, choose the default options for each port as it prompts you.(The window with the blue screen)
I've choosen to deselect the options EXAMPLES and DOCS for the port(s) that have it.

NOTE: The steps below needs to be run as the user root. Either 'su -' or 'sudo -s' to switch to root.


1. Install axel
  cd /usr/ports/ftp/axel
  make install clean

2. Configure /etc/make.conf
  # Replace fetch(1) with axel(1) <- Optional

3. Update ports tree
  cd /usr/ports
  svnlite up

4. Install Monitorix
  cd /usr/ports/sysutils/monitorix
  make install clean

5. Install pflogsumm (For Postfix MTA)
  cd /usr/ports/mail/pflogsumm
  make install clean

6. Edit /usr/local/etc/monitorix.conf
  These are the only things that I changed:-

    title = Monitorix -
    hostname =
    show_gaps = y
	enabled = y
	host =
	port = 8181
	user = www
	group = www
	log_file = /var/log/monitorix-httpd.log
	hosts_deny = all
	hosts_allow =,,


    # This is where you enable or disable the services you want to monitor. The boolean is y/n.
	system          = n                                                                                                                                                     
	kern            = n                                                                                                                                                     
	proc            = n                                                                                                                                                     
	hptemp          = n                                                                                                                                                     
	lmsens          = n                                                                                                                                                     
	nvidia          = n                                                                                                                                                     
	disk            = n                                                                                                                                                     
	fs              = n                                                                                                                                                     
	net             = y                                                                                                                                                     
	serv            = n                                                                                                                                                     
	mail            = y                                                                                                                                                     
	port            = n                                                                                                                                                     
	user            = y                                                                                                                                                     
	ftp             = n                                                                                                                                                     
	apache          = n                                                                                                                                                     
	nginx           = n                                                                                                                                                     
	lighttpd        = n                                                                                                                                                     
	mysql           = n                                                                                                                                                     
	squid           = n                                                                                                                                                     
	nfss            = n                                                                                                                                                     
	nfsc            = n                                                                                                                                                     
	bind            = n                                                                                                                                                     
	ntp             = n                                                                                                                                                     
	fail2ban        = n                                                                                                                                                     
	icecast         = n                                                                                                                                                     
	raspberrypi     = n                                                                                                                                                     
	phpapc          = n                                                                                                                                                     
	memcached       = n                                                                                                                                                     
	wowza           = n                                                                                                                                                     
	int             = n                                                                                                                                                     


    # Email Reports - Daily reports only. Rest disabled.
    # --------------------------------------------------
    enabled = y
    url_prefix =
    smtp_hostname = localhost
    from_address = root@localhost
      enabled = y
      graphs = mail, user
      to =,,

7. Edit /etc/rc.conf

8. Start Monitorix
  /usr/local/etc/rc.d/monitorix start

9. Check that Monitorix is running
  ps aux | egrep monitorix

10. Open your browser and goto >

Click on the 'OK' button and you should start seeing your graphs. Page will auto refresh every 150s by default.


While looking at the logfile (/var/log/monitorix), I came across an error saying permission denied about pangorc. This is how I fixed it:

  # mkdir -p /root/.config/pango
  # chmod 0755 /root/.config
  # cat << _EOF > /root/.config/pango/pangorc
    ModulesFiles = /usr/local/etc/pango/pango.modules
  # /usr/local/etc/rc.d/monitorix restart

Look at the logfile again while refreshing the page. You should not see pango related errors again.