Help Docs ~ Server Monitoring

Running a Docker environment? Our docker-scout container provides an instant monitoring environment for your host and containers.

Quick Start

1. Create a configuration file

Create a file called scoutd.yml (or copy our template.
Your account_key is required, all other values are optional. To get your account key, you need to be logged into your account, and go to the "Account Basics" section.

Here is a list of options currently available for scoutd.yml:

# account_key is the only required value

Note: StatsD is enabled by default within in the Docker container. To disable StatsD, replace the addr: line with enabled: false and restart the scout container.

2. Build the docker image

Create file "Dockerfile" from:

Go to the folder with the Dockerfile and run:

docker build -t scoutapp/docker-scout .

Note: scoutapp/docker-scout is a name of the docker image - you can change it.

3. Run the docker image

Run the following command in the directory containing your scoutd.yml file:

docker run -d --name scout-agent \
-v /proc:/host/proc:ro \
-v /etc/mtab:/host/etc/mtab:ro \
-v /var/run/docker.sock:/host/var/run/docker.sock:ro \
-v `pwd`/scoutd.yml:/etc/scout/scoutd.yml \
--net=host --privileged scoutapp/docker-scout

Reading host metrics

We want to look at resources on this host, not this container.

The server_metrics Ruby gem used by the scout agent primarily looks at the /proc directory, but, if available, will instead read from /host/proc, which is expected to be mounted from the host when running the container (-v /proc:/host/proc:ro in the above command sample).

The server_metrics gem will also default to reading from /host/etc/mtab (also mounted above), if it exists, to determine the drives mounted on the host. It will recognize theses hosts inside the container if they are mounted by UUID (/dev/disk/by-uuid/XXXXX).

The --net=host flag will allow gathering network metrics from the host.

The --privileged flag will allow gathering the disk capacity metrics from the host.

scoutd config options

Any option may be set in the provided scoutd.yml file. This file must be world-readable and mounted to /etc/scout/scoutd.yml (see above command).
For a list of options, see scoutd.yml within docker-scout.

Monitoring Docker Containers

Monitor the resource usage of your running containers with our Docker Monitoring Plugin.

Monitoring Docker Events

docker-scout includes a script that monitors Docker events (creating/starting/destroying/etc) and reports those metrics via StatsD. No extra dependencies are required.

Reading Plugin Metrics

Pingdom Server Monitor has many available publicly available plugins and supports Custom Plugins as well. Given this flexibility, the docker image may need to be customized to gain access to resources required by specific plugins.

Mounting files/directories

Simply mount the file or directory from the

docker run --name=scout-webapp --volume=/var/log/some.log scoutapp/webapp
docker run --name=scout-agent --volumes-from=scout-webapp scoutapp/docker-scout

Communicating over ports

If the plugin relies on a database connection (for example postgres), you will have to either download and update the docker-scout Dockerfile or create a new one that inherits from the docker-scout image, and install postgres as part of the build.

FROM scoutapp/docker-scout

USER root
RUN apt-get install -y postgresql-client libpq-dev
RUN gem install pg

USER scoutd # need to run the container under the scoutd user

The simplest way to link the containers is to specify a port. See the documentation on linking containers. For example:

docker run -d -p 5432:5432 postgres

Apply the appropriate settings to the plugin:

Other setups

If the plugin requires the output of a command not available in the Pingdom server Monitor container and/or the information is not accessible over a port or through a mounted file, the setup might be more nuanced. Feel free to contact us at [email protected] for assistance.

Questions? Using Docker?

Shoot us an email at [email protected] or open an issue on our GitHub page.

Updated 4 months ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.