Install xymon server on FreeBSD

    

Because it takes only a few minutes to do and because I didn’t find any tutorial on the Net, here’s my notes to get Xymon server running on FreeBSD.

Install Xymon server

Add the package and set the start parameter:

  # pkg_add -r xymon-server
  
  # echo 'xymon_server_enable="YES"' >> /etc/rc.conf

Configure Xymon server to check it-self:

  # vi /usr/local/www/xymon/server/etc/hosts.cfg
  (...)
  127.0.0.1 localhost # bbd http://localhost/

Setup some permissions, start the daemon and check that it works:

  # chown xymon /usr/local/www/xymon/server/www
  
  # /usr/local/etc/rc.d/xymon-server start
  
  # tail /var/log/xymon/xymond.log 
  2012-06-02 11:03:15 Setup complete

Install the Web server

Xymon server listens on port 1984 but you need a Web server to actually see the GUI. I’m using lighttpd here as it is tiny and fast:

  # pkg_add -r lighttpd
  
  # echo 'lighttpd_enable="YES"' >> /etc/rc.conf
  
  # vi /usr/local/etc/lighttpd/modules.conf
  (...)
  "mod_alias",
  (...)
  include "conf.d/cgi.conf"
  (...)
  
  # vi /usr/local/etc/lighttpd/conf.d/cgi.conf
  (...)
  cgi.assign = ( ".sh"  => "/bin/sh" )
  (...)
  
  # vi /usr/local/etc/lighttpd/lighttpd.conf
  (...)
  var.server_root = "/usr/local/www/xymon/server/www"
  (...)
  server.document-root = server_root + "/"
  (...)
  alias.url += ( "/xymon/" => server_root + "/" )
  alias.url += ( "/xymon-cgi/" => "/usr/local/www/xymon/cgi-bin/" )
  (...)
  #var.vhosts_dir  = server_root + "/vhosts"
  (...)
  server.document-root = "/usr/local/www/xymon/server/www/"
  (...)
  
  # /usr/local/etc/rc.d/lighttpd start

Now, browse http://localhost/xymon/ and watch your Xymon instance working.

Note that the xymon-seccgi is not configured here. Should you want to use it, create the alias for it and set the credentials to secure the access.