This script first authenticates the user for the tenant, then calls the Nova RESTful API with the authentication token, getting a list of servers and their details. The inventory is then generated from either the fixed or floating IP addresses.

You can instead create a local.conf file to override the selected version – but this applies to the node that the service will run on. Editting the version, as above, before submitting the unit file allows this version to be set for the whole cluster.

Next edit the pastmon-web@service file to bind it to the frontend node of the cluster:

Constrain web container to the frontend node

INI

1

2

3

[X-Fleet]

MachineMetadata=frontend

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

You can do this either using the MachineMetadata or MachineID from /etc/machine-id.

Submit all of the unit files to fleet:

Submit the unit files

Shell

1

$fleetctl submit pastmon-*.service

Start the pastmonweb services:

Start web service

Shell

1

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

The pastmon-web-discovery@.service is actually a “sidekick” to register the pastmonweb service as active to etcd – which provides host and port details to the pastmonsensors running on the other nodes in the cluster.

Once the web service is running (the first time will take a few minutes to download the docker image) you can point your browser at http://your-front-end-floating-ip:8080. You should see a login screen for the PasTmon web app, like this:

You can login with the default credentials – user: “admin”, password: “admin”.

Next we can start the pastmon-sensor services on the remaining nodes in the cluster (the pastmonweb service also contains it’s own sensor) by running:

Start pastmon sensors

Shell

1

$fleetctlstartpastmon-sensor@{1..6}.service

The “1..6” here means to start 6 instances numbered 1 through 6.

These should automatically discover the web service and connect to it’s postgresql database on port 5432. After a while you should start to see measurement data in the web UI.

Here are a couple of screenshots of what to expect:

This one is showing the per 5 minute average of network round-trip-times for the postgresql server running on the pastmonweb container.

The way the pastmon sensor containers are configured allows them to bind to the same IP Namespaces as the CoreOS cluster nodes – so the sensors can see all of the traffic of all of the containers being run on that node.