Add Monitoring Stack

Agenda

  • Monitoring Stack
  • Add Monitoring Stack to html5as-base
  • Verification

This HowTo describe the how add the monitoring stack to a software release using html5as-base as an example.

Here is the commit introducing this functionality to html5as Software release: commit diff.

Monitoring Stack

  • Provides promises to track the state of a service over time
  • Provides a dedicated webservice to remotely monitor the service
  • Bonus: Includes the logrotate stack

The monitor stack is used in all productions instance. It is an essential component to monitor the internal of a service with the necessary granularity.

Monitor App

Monitor app for a Service

In the monitor app that uses the monitor webservices to aggregate data, you can see the history of failing services.

Add monitor stack in software.cfg

The Monitor stack needs to be extended in software.cfg.

Additionally the instance template for monitor needs to be provided to html5as instance. So it needs to be passed to the local instance template

[buildout]
extends =
  ...
# Extend monitoring stack to provide necessary tools for monitoring
  ../../stack/monitor/buildout.cfg

...
[template-cfg]
...
context =
...
# Monitor stack also provides a template for the instance
  key template_monitor monitor2-template:rendered

Add monitor template

In instance.cfg.in, add the monitor instance template to [profile-common].

[profile-common]
...
template_monitor = {{ template_monitor }}

Extend Monitor Instance Template

In instance_html5as.cfg.in extend the monitor instance template to include monitor sections.

[buildout]
...
# Instance profile extends monitoring stack
extends = {{ parameter_list['template_monitor'] }}

Update md5sums

Refer How To Move to md5sum automatic update to update md5sum:

$ cd ~/srv/project/slapos/software/html5as-base
$ ../../update-hash

Validation

  1. Locate runner/software/{software-hash}/
  2. Display template-monitor.cfg

Locate {software-hash}

Since the software.cfg has been modified, it requires to be re-compiled by

$ slapos node software --all

Once it finished, locate the {software-hash} file at runner/software/{software-hash}/

template-monitor.cfg

As template_monitor has been defined, you can find template-monitor.cfg is now present at runner/software/{software-hash}/template-monitor.cfg.

Thank You

  • Nexedi SA
  • 147 Rue du Ballon
  • 59110 La Madeleine
  • France
  • +33629024425

For more information, please contact Jean-Paul, CEO of Nexedi (+33 629 02 44 25).