serverdensity #2

  • By charmers
  • Latest version (#2)
  • precise
  • Stable
  • Edge

Description

Server Density is a SaaS tool which helps you run your infrastructure. It
syncs with the major cloud providers and and allows you to monitor your
websites and servers from a single console, API and mobile app so you can
diagnose problems, maintain uptime and maximise performance.

This charm installs and configures the Server Density monitoring agent
(sd-agent).

Overview

Server Density is a hosted server monitoring service.

This juju subordinate charm installs and configures the Server Density monitoring agent onto any specified related units.

Usage

Review the configurable options below, you must configure at
least your account name, and an agent key for each unit or provide an API key to use the API to query
for units (optionally provide a group name to group units in clusters).

juju deploy serverdensity

# For a whole deployed application:
juju add-relation <application> serverdensity

# or for a single unit
juju add-relation <application>/<unit> serverdensity

# Setting an agent key for a unit
juju set serverdensity/<unit> agent-key=foobarbaz

Configurable options

  • sd-url
  • Your Server Density subdomain, prefixed with either http:// or https://
  • default: "https://example.serverdensity.io"
  • api-key
  • Your Server Density v2 API key (not used if agent-key is set)
  • agent-key
  • Your Server Density agent key (don't set this if you want to use the API to handle querying nodes/creating nodes)
  • group-name
  • Cluster group name (only set if you use the API to add nodes to a specific group)
  • plugin-dir
  • Sets the directory the agent looks for plugins, if left blank it is ignored
  • apache-url
  • URL to get the Apache2 status page from (e.g. mod_status), disabled if not set
  • apache-user
  • Username to authenticate to the Apache2 status page, required if apache-url is set
  • apache-pass
  • Password to authenticate to the Apache2 status page, required if apache-url is set
  • mongodb-server
  • Server to get MongoDB status monitoring from, this takes a full MongoDB connection URI so you can set username/password etc. details here if needed, disabled if not set
  • mongodb-dbstats
  • Enables MongoDB stats if true and mongodb-server is set
  • default: false
  • mongodb-replset
  • Enables MongoDB replica set stats if true and mongodb-server is set
  • default: false
  • mysql-server
  • Server to get MySQL status monitoring from, disabled if not set
  • mongo-server
  • Username to authenticate to MySQL, required if mysql-server is set
  • mysql-pass
  • Password to authenticate to MySQL, required if mysql-server is set
  • nginx-url
  • URL to get the Nginx status page from, disabled if not set
  • rabbitmq-url
  • URL to get the RabbitMQ status from via the HTTP management API, disabled if not set
  • rabbitmq-user
  • Username to authenticate to the RabbitMQ management API, required if rabbitmq-url is set
  • default: "guest"
  • rabbitmq-pass
  • Password to authenticate to the RabbitMQ management API, required if rabbitmq-url is set
  • default: "guest"
  • temp-dir
  • Override where the agent stores temporary files, system default tmp will be used if not set
  • pidfile-dir
  • Override where the agent stores it's PID file, temp dir (above or system default) is used if not set
  • log-level
  • Level to log, e.g. set to DEBUG if you experience issues with the agent and want to collect extra info

Caveats

  • Although where ever possible the charm attempts to proceed without erroring, by attempting to get key information such as the agent key from various sources, as well as registering via the API if configured, the one time in which it will stop with an error if it exhausts all possibilities and still cannot configure an agent key.
  • You cannot currently configure plugins via the charm, as this would mean allowing a dynamic configuration and some way of injecting your own Python files into the relation cycle. You can however fork the charm and add your own plugins in that way, or instrument plugins using a configuration manager such as Chef, Puppet, Ansible, Salt etc.
  • The hooks in this charm are as idempotent as possible, they can be run multiple times without problem and should produce the same output. When the charm is removed from a unit it attempts to clear up after itself by removing the sd-agent package and it's corresponding apt repo, however files such as the config and plugins directory will be left. Subsequent runs of the charm would overwrite the config, but beware that any left over plugins may be picked up erroneously if you didn't clear them out (e.g. using a configuration manager as above).

Contact

This charm is created and maintained by Wes Mason, you can contact him via:

  • IRC, he is wesleymason on freenode
  • Twitter
  • Or, if you must, email wes at 1stvamp dot org.

Copyright

This charm is released under a 3-clause BSD license, see the copyright file.

The only exception to this is the icon, which is (C) Server Density 2014. All rights reserved.

sd-agent

Configuration

apache-url
(string) URL to get the Apache2 status page from (e.g. mod_status), disabled if not set
apache-pass
(string) Password to authenticate to the Apache2 status page, required if apache-url is set
nginx-url
(string) URL to get the Nginx status page from, disabled if not set
mysql-pass
(string) Password to authenticate to MySQL, required if mysql-server is set
plugin-dir
(string) Sets the directory the agent looks for plugins, if left blank it is ignored
agent-key
(string) Your Server Density agent key (don't set this if you want to use the API to handle querying nodes/creating nodes)
sd-url
(string) Your Server Density subdomain, prefixed with either http:// or https://
https://example.serverdensity.io
temp-dir
(string) Override where the agent stores temporary files, system default tmp will be used if not set
mongodb-server
(string) Server to get MongoDB status monitoring from, this takes a full MongoDB connection URI so you can set username/password etc. details here if needed, disabled if not set
api-key
(string) Your Server Density v2 API key (not used if agent-key is set)
log-level
(string) Level to log, e.g. set to DEBUG if you experience issues with the agent and want to collect extra info
rabbitmq-pass
(string) Password to authenticate to the RabbitMQ management API, required if rabbitmq-url is set
guest
mysql-server
(string) Server to get MySQL status monitoring from, disabled if not set
group-name
(string) Group name (only set if you use the API to add nodes to a specific group)
rabbitmq-user
(string) Username to authenticate to the RabbitMQ management API, required if rabbitmq-url is set
guest
mongodb-dbstats
(boolean) Enables MongoDB stats if true and mongodb-server is set, default: false
pidfile-dir
(string) Override where the agent stores it's PID file, temp dir (above or system default) is used if not set
mongo-server
(string) Username to authenticate to MySQL, required if mysql-server is set
mongodb-replset
(boolean) Enables MongoDB replica set stats if true and mongodb-server is set, default: false
apache-user
(string) Username to authenticate to the Apache2 status page, required if apache-url is set
rabbitmq-url
(string) URL to get the RabbitMQ status from via the HTTP management API, disabled if not set