I've recently started using Joyent for my production hosting needs at work. It's been a great experience so far. The virtual hardware is great (very fast and never crashes), their support has been very helpful, and if you have a bandwidth intense app their prices are impossible to beat.
Now that things are starting to get up and running at Joyent, I decided it was time to set up monitoring. Many people on Joyent use munin, but I'm more familiar with Nagios so I decided to give it a go. It went pretty well, but I did run into a couple hiccups so I'm documenting my installation here.
Now that things are starting to get up and running at Joyent, I decided it was time to set up monitoring. Many people on Joyent use munin, but I'm more familiar with Nagios so I decided to give it a go. It went pretty well, but I did run into a couple hiccups so I'm documenting my installation here.
- Create the nagios user and group if they're not there already
groupadd nagios useradd -g nagios -s /usr/bin/false -d /wherever -c 'Nagios User' nagios
- Run the package installer if nagios isn't already installed (as it turns out I already had nagios installed)
pkg_add http://pkgsrc.joyent.com/2008Q3/net/nagios-base-3.0.3.tgz
- Create a virtual host for Nagios
sudo vi /opt/local/etc/httpd/virtualhosts/nagios.conf
with these contents:ScriptAlias /nagios/cgi-bin "/home/jill/cgi-bin/nagios" <Directory "/home/jill/cgi-bin/nagios"> AllowOverride None Options ExecCGI Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /opt/local/etc/nagios/htpasswd.users Require valid-user </Directory> Alias /nagios "/opt/nagios/share" <Directory "/opt/nagios/share"> Options None AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /opt/local/etc/nagios/htpasswd.users Require valid-user </Directory> - This should have been it, but I was seeing a cryptic error from suExec. As it turns out suExec was preventing them from executing. Since I didn't have the time to learn suExec, I took the easy way out and moved the CGI files to the docroot (which was the seed user's folder)
