Aller au contenu

Labels for monitoring (Caascad)#

Zone nomenclature for Caascad.

Dashboards#

Note

There is no Grafana in Client cluster. No dashboard either.

Subzone name Subzone Label
Caascad infra/staging infra/production cloud/caascad grafana-dashboard-caascad
Cloud Client cloud/client grafana-dashboard-client

Note

The client has no access to K8S and will not be able to deploy configmaps directly. So the client has no knowledge of this label.

Datasources#

Note

There is no Grafana in Client cluster. No datasouces either.

Subzone name Subzone Label
Caascad infra/staging infra/production cloud/caascad grafana-datasource-caascad="1"
Cloud Client cloud/client grafana-datasource-client="1"

podMonitors and serviceMonitors#

Subzone name Subzone Label
Caascad infra/staging infra/production cloud/caascad client/caascad caascad.com/prometheus-monitor="caascad"
Consumption infra/staging/consumption infra/production/consumption caascad.com/prometheus-monitor="consumption"
Cloud Client cloud/client caascad.com/prometheus-monitor="client"
Cloud App cloud/app No podMonitors nor serviceMonitors in this zone
Dev any subzone caascad.com/prometheus-monitor="caascad"
Client client caascad.com/prometheus-monitor="caascad" + optional caascad.com/prometheus-monitor-scope="caascad" (see below)

Principle : if an application of the Cloud zone is exposed to the client, it will be monitored by the Prometheus in Cloud Client zone. Examples : git, CI/CD...

Client zone specific case#

Client zones are scrapped Prometheus in the client zone. For this, label caascad.com/prometheus-monitor="caascad" is mandatory.

All metrics from Prometheus in the client zone will be stored in the Cloud-app zone.

If you want to duplicate the metrics of the client zone in the Cloud-client zone, you need to put an additionnal label caascad.com/prometheus-monitor-scope="caascad".

Note

Label caascad.com/prometheus-monitor-scope="app" is ignored. It used to be in use in an older architecture. It can safely be removed.

Dev environments specific case#

You may set caascad.com/prometheus-monitor="caascad" like in the other environments. In fact, do what you want.

Additionnal labels to identify metrics, logs and alerts#

See MVPMON-130 comments to see the long discussion how we chose those labels and their possible values.

Some additionnal labels may be needed to identify a metric :

  • where does it comes from (which prometheus scraped it) ?
  • where is it stored ?

Those labels may be added to better identify a metric :

  • cc_prom : prometheus where the metric is used (visualization with grafana and alert generation)
  • cc_prom_source : prometheus where the metric comes from
  • obs_client (default) and/or cc_client : identity of the client
  • cc_consumption_client : identity of the billed client

Label cc_prom : possible values#

Prometheus Label value
infra/caascad infra-caascad
infra/consumption infra-consumption
cloud/caascad cloud-caascad
cloud/client cloud-client
cloud/app cloud-app
client N/A

Use-case : for alerting

Label cc_prom_source : possible values#

Same as cc_prom above.

For Prometheus in client zone, value is <cluster ID>.

Use-case : for logging, monitoring and alerting

Label obs_client and/or cc_client : possible values#

Value is <client ID> except in infra zone.

In infra zone, value is infra-stg or infra-prd.

Use-case : for alerting

Label cc_consumption_client : possible values#

Used only in infra zone.

Value is <client ID>.

Need and override for labels cc_* and/or obs_*#

label tool need override is possible ?
cc_prom metrics optional yes
cc_prom logs optional yes
cc_prom alerts mandatory yes
cc_prom_source metrics mandatory (see note below) no (see note below)
cc_prom_source logs mandatory no
cc_prom_source alerts mandatory no
cc_client metrics optional no
cc_client logs optional no
cc_client alerts mandatory no
obs_client metrics optional no
obs_client logs optional no
obs_client alerts mandatory no
cc_consumption_client metrics mandatory no
cc_consumption_client logs no no
cc_consumption_client alerts mandatory no

Note

In Prometheus cloud-client and cloud-app, the cc_prom_source is set (or overwritten) at the federation step because we do not expect the client to set this label himself.

PrometheusRules#

Note

There is no Alertmanager in Client cluster. No prometheusrules either.

Subzone name Subzone Label
Caascad infra/staging infra/production cloud/caascad caascad.com/prometheus-rules: "caascad"
Consumption infra/staging/consumption infra/production/consumption caascad.com/prometheus-rules: "consumption"
Cloud Client cloud/client caascad.com/prometheus-rules: "client"
Cloud App cloud/app caascad.com/prometheus-rules: "app"