Containerized private minion (CPM) maintenance and monitoring

After installing your Containerized Private Minion (CPM), you can keep track of its maintenance and monitoring in several ways:

You can also get notified of monitor failures with New Relic Alerts.

Check CPM status via Synthetics REST API

Querying a running CPM with the Synthetics REST API is the easiest way to check if it's healthy and working. The container exposes two ports: 8080 and 8180. If CPM is launched with a structure similar to:

  docker run ... -p 8080:8080 -p 8180:8180 ...

You can check the CPM with the following endpoints:

  • :8080/status/check: provides details about internal health checks that the minion performs. HTTP 200 means the status is healthy.
  • :8080/status: provides details about a minion's status, which is the same data published in Insights as SyntheticsPrivateMinion event.
  • :8180/: provides JVM application admin endpoints. This is an advanced view of a minion's Java Development Kit (JDK) internal state.

Check if your private location requires more minions

If your private location has multiple monitor checks queued up and you experience delays, you may need more minions available to execute the monitor checks. To learn how to verify this, see Does my private location need more minions?

Review Docker logs

You can monitor your minions' health by looking at the CPM's container logs.

This is an example of a CPM log indicating that the minion is working properly:

  docker logs [YOUR_CONTAINER_NAME]
  2018-10-10 11:33:29,856 - Minion ID: a21f6d7f-4f65-4dec-92fb-88cb975d2a19
  2018-10-10 11:33:29,869 - Publishing resources for Private Minion API: /status/check, /build-info, /status
  2018-10-10 11:33:40,527 - Minion is configured, checking if it is healthy...
  2018-10-10 11:33:43,471 - Launching in PRIVATE Location: 123456-example_private_loc-480
  2018-10-10 11:33:43,723 - Configured 2 heavy worker threads, and 50 light worker threads
  2018-10-10 11:33:43,796 -
  2018-10-10 11:33:43,796 - **************************************************************************
  2018-10-10 11:33:43,796 - * Synthetics Minion is ready and servicing location 'example_private_location'
  2018-10-10 11:33:43,796 - **************************************************************************
  ... logging continues ...

Enable debug logs

If you experience issues with your CPM, you can enable debug logs to help troubleshoot issues.

The default level of logging is set to only inform the user of key information and actionable errors. If this is insufficient, you can enable a more verbose logging by using the MINION_LOG_LEVEL environment variable.

Adding -f to the docker logs makes the command follow logs.

 
  docker run ... -e MINION_LOG_LEVEL=DEBUG ...
  docker logs -f YOUR_CONTAINER_NAME
  ... verbose logging continues ...

Monitor CPMs with New Relic Infrastructure

New Relic Infrastructure supports advanced Docker monitoring. To add support for this, Synthetics labels the containers spawned by CPM with a series of informative labels, all prefixed with synthetics-minion-. You can use these labels to identify CPM-spawned containers that are running your monitors. Example labels include:

  • synthetics-minion-runner-role
  • synthetics-minion-runner-version
  • synthetics-minion-container-id
  • synthetics-minion-id
  • synthetics-minion-build-number
  • synthetics-minion-job
  • synthetics-minion-account
  • synthetics-minion-monitor
  • synthetics-minion-monitor-version
  • synthetics-minion-monitor-type
  • synthetics-minion-monitor-type-label

For more help

Recommendations for learning more: