Monitoring

In current version OpeNgine supports one monitoring tool - Prometheus. It is available in two modes - centralized metrics collector scraping data accross multiple clusters or dedicated Prometheus instance per cluster. In the OpeNgine configuration file environment/vars.yml all monitoring settings are defined as single monitoring: block containing multiple sub-sections - one sub-section per cluster.

The sections below outline two different configuration options. *Please note: the options listed below provide flexibility, but require carefull planning to match corresponding dashboard(s) configuration.

Centralized Metrics Collector

To enable centralized scraping data accross multiple clusters, single cluster is appointed to be with type: provision-prometheus-master and the rest of clusters are configured as type: provision-prometheus-slave. OpeNgine will install Prometheus only to master cluster and will apply security settings (user/role/certificate) to the rest of clusters (slaves) to allow remote scrapping from master.

In this case configuration structure will look like this:

monitoring:
  the-first-cluster:
    type: provision-prometheus-master
    ...
  the-second-cluster:
    type: provision-prometheus-slave
    ...
  the-N-th-cluster:
    type: provision-prometheus-slave
    ...

Prometheus Instance Per Cluster

If you want to keep metrics local in each cluster, use type: provision-prometheus-local for all clusters. OpeNgine will install Prometheus to every cluster listed in the configuration (local setup).

In this case configuration structure will look like this:

monitoring:
  the-first-cluster:
    type: provision-prometheus-local
    ...
  the-second-cluster:
    type: provision-prometheus-local
    ...
  the-N-th-cluster:
    type: provision-prometheus-local
    ...

Mixed Configuration

In some cases you may want to mix the above options. E.g. most of clusters are scraped to central location, but single cluster “A” has dedicated setup. This is possible, just use type: provision-prometheus-local for cluster “A” and combination of type: provision-prometheus-master and type: provision-prometheus-slave for the rest of clusters.

In this case configuration structure will look like this:

monitoring:
  the-first-cluster:
    type: provision-prometheus-master
    ...
  the-second-cluster:
    type: provision-prometheus-slave
    ...
  the-unique-cluster:
    type: provision-prometheus-local
    ...

Yaml Configuration Schema

The following mixed configuration example illustrates all possible settings in Yaml configuration:

monitoring:
  the-first-cluster:
    type: provision-prometheus-master
    collector_account: "prometheus-account"
    collector_namespace: "kube-system"
    helm:
     repo:
       name: "prometheus"
       url: "https://kubernetes-charts.storage.googleapis.com/"
     chart:
       app_name: "opengine-prometheus"
       name: "prometheus"
       version: "8.9.0"
       appVersion: "2.8.0"
  the-second-cluster:
    type: provision-prometheus-slave
    collector_account: "prometheus-account"
    collector_namespace: "kube-system"
  the-unique-cluster:
    type: provision-prometheus-local
    collector_account: "prometheus-account"
    collector_namespace: "kube-system"
    helm:
     repo:
       name: "prometheus"
       url: "https://kubernetes-charts.storage.googleapis.com/"
     chart:
       app_name: "opengine-prometheus"
       name: "prometheus"
       version: "8.9.0"
       appVersion: "2.8.0"

Element

Description

type

The type can be provision-prometheus-master, provision-prometheus-slave or provision-prometheus-local. See above sections for more information on how to use these types.

collector_account

OpeNgine will provision this account in Kubernetes and will run Prometheus using this account (for master and local) or will use this account to authenticate remote scraping calls (for slave configuration).

collector_namespace

Existing Kubernetes namespace, in most cases must be kept == "kube-system".

helm

Parent element containing Helm chart details. Allows to control which version is installed and from which repository.

helm.repo.name and helm.repo.url

Chart name and repository location.

helm.chart

List of settings including: application version, chart version, appication name etc.