Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

PasTmon Web App with Sensor Docker Image for CoreOS

Part of the PasTmon Passive Application Response Time Monitor Project.

See reapingzombies4funandprofit blog article: PasTmon Passive Application Response Time Monitoring a CoreOS Cluster

Passive Application Monitoring for all containers running on a CoreOS host.

Provides an image for the PasTmon Web Front-end (including it's own Sensor) and a
Sensor only image.

On your frontend node:

$ git clone
$ cd pastmon

Edit the unit files pastmon-(web|sensor)@.service to choose your required version:

Environment=PTAG=0.17  # Docker image tag version e.g. latest, 0.17, etc...
EnvironmentFile=-/etc/systemd/system/pastmon.service.d/local.conf    # Allows override per node

or you can place your version locally (per node) in the local.conf file, like this:

# /etc/systemd/system/pastmon.service.d/local.conf

Also, set the MachineMetadata tag or MachineID in the [X-Fleet] section of the pastmon-web
unit file:

#MachineID=...  # from /etc/machine-id

Use MachineID to bind the web service to a specific frontend or use MachineMetadata to prefer a tagged node.

Submit the unit files and start the web service:

$ fleetctl submit pastmon-*.service

$ fleetctl start pastmon-web@1.service pastmon-web-discovery@1.service

Follow progress of the web unit using:

$ fleetctl journal -f pastmon-web@1.service

When ready, point your browser at http://your-front-end-host:8080, default user/password is admin/admin.

You can also start PasTmon sensor containers on your other CoreOS hosts:

$ fleetctl start pastmon-sensor@{1..5}.service

(the 1..5 tells fleet to deploy 5 containers numbered 1 through 5 - so subsitute the number of
remaining nodes in your CoreOS cluster to deploy to.)

These should auto discover your instance of pastmon-web@1 running in the cluster, via etcd.

Other start options are (default values shown):


These can be added to the docker run ... command in the pastmon-web@.service unit file (see that file for examples).
Also, if you change the dbport default, then you must update the respective value in pastmon-web-discovery@.service unit file,
so it can inform other pastmon sensors in the cluster.

The pastmon-web@service unit will create a docker container called pastmon-db, this is to
provide a persistent database volume (allowing future upgardes of the PasTmon web container
without loosing your data).

Should you need to delete the pastmon-db container and it's persistent database volume,
use docker rm -v ... - otherwise you end up with orphaned volumes.

Can I Use this on an OS other than CoreOS?

Yes. You just need a recent version of docker installed, and run the container directly:

Create the persistent db data volume container:

$ docker create -v /var/lib/postgresql -v /var/run/postgresql \
    --name pastmon-db busybox

Run PasTmon Web Service:

$ docker run --name pastmon-web --volumes-from pastmon-db \
    --net=host --cap-add=NET_ADMIN gbevan/pastmonweb

Run any needed PasTmon Sensors (on nodes other than PasTmon Web Services):

$ docker run --name pastmon-sensor1 --net=host --cap-add=NET_ADMIN \
    gbevan/pastmonsensor "dbhost=....; dbport=5432"

Removing the docker containers after fleetctl destroy

$ ./ -h | -v | -y

Options are:

-h - help
-v - delete the persistent database volume (pastmon-db)
-y - assume yes to go ahead and do this without prompting
Docker Pull Command
Source Repository