Still loving BOA, thanks!

I set up another one recently and had the same annoyance with CGP as before... It's not logging any MySQL or Nginx stats, which is odd for an Nginx-based webserver!

I wondered if it would be possible could have this added so it works out of the box?

Comments

jim kirkpatrick’s picture

Title: Include more monitoring on CGP by default » Include more monitoring to CGP by default
Priority: Normal » Minor
Status: Needs work » Active

And I thought I'd add a quick how-to for Nginx monitoring in case it helps resolve this, or other people...

1. Edit /etc/collectd/collectd.conf and uncomment the LoadPlugin nginx line near the top (remove #).

2. Add (or adapt commented section) in same file like below -- note that hostmaster.fqdn is the name of your master Aegir instance and the fully qualified domain name).

<Plugin nginx>
	URL "http://cgp.hostmaster.fqdn/nginx_status"
	VerifyPeer false
	VerifyHost false
</Plugin>

3. Adding a new 'location' to /var/aegir/config/server_master/nginx/vhost.d/cgp.hostmaster.fqdn so the file looks like this -- making sure to change [server ip] to the correct IP(s). :

server {
   include     /var/aegir/config/includes/fastcgi_params.conf;
   limit_conn  gulag 32;
   listen      *:80;
   server_name cgp.hostmaster.fqdn;
   root        /var/www/cgp;
   index       index.php index.html;
   include     /var/aegir/config/includes/nginx_compact_include.conf;

   # nginx statistics for cgp
   location /nginx_status {
      stub_status             on;
      access_log              off;
      allow                   [server ip];
      allow                   127.0.0.1;
      deny                    all;
   }
}

4. Restart cgp and nginx: service nginx restart, then service collectd restart

5. Done (I think!) and CGP will shortly start showing Nginx graphs.

(Note that MySQL is easy too, though I think the best way there is to add a new limited access DB user... is that true?)

jim kirkpatrick’s picture

Title: Include more monitoring to CGP by default » Include more monitoring on CGP by default

Grammar tweak in title.

omega8cc’s picture

Priority: Minor » Normal
Status: Active » Needs work

Nice idea. Patches are welcome!

radimklaska’s picture

Just two little things:

  • there is ; after [server ip]
  • and instead of service cgp restart it's service collectd restart

Works like a charm, thanks!

jim kirkpatrick’s picture

Title: Include more monitoring to CGP by default » Include more monitoring on CGP by default
Priority: Minor » Normal
Status: Active » Needs work

Thanks radimklaska, post edited with your corrections...

I hope to try my hand at the patch for this soon (baby permitting!), so hopefully this will be out-the-box for BOA 2.0.7.

jim kirkpatrick’s picture

Issue summary: View changes

politer ask

omega8cc’s picture

Version: » 6.x-2.x-dev
Issue summary: View changes
Status: Needs work » Fixed

Nginx monitoring is now included by default when collectd is installed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.