Skip to content

Latest commit

 

History

History
140 lines (98 loc) · 4.37 KB

INTEGRATING.md

File metadata and controls

140 lines (98 loc) · 4.37 KB

Integrating alertmanager-k8s

Alermanager can handle different types of relations in the provides side and in the requires side.

Provides

Alerting

  alerting:
    interface: alertmanager_dispatch

Over the alertmanager_dispatch relation interface Alermanager can be related to charms that can forward alerts to it, for example: Prometheus, Loki.

juju relate alertmanager-k8s:alerting prometheus-k8s:alerting

Karma dashboard

  karma-dashboard:
    interface: karma_dashboard

The karma_dashboard relation interface links an entire Alertmanager cluster to a Karma dashboard. Scaling alertmanager would automatically cause karma to group alerts by cluster.

juju relate alertmanager-k8s:karma_dashboard karma-k8s:karma_dashboard

Self metrics endpoint

self-metrics-endpoint:
    interface: prometheus_scrape

This Alertmanager charm may forward information about its metrics endpoint and associated alert rules to a Prometheus charm over the self-metrics-endpoint relation using the prometheus_scrape interface. In order for these metrics to be aggregated by the remote Prometheus charm all that is required is to relate the two charms as in:

juju relate alertmanager-k8s:self-metrics-endpoint prometheus:metrics-endpoint

Grafana dashboard

  grafana-dashboard:
    interface: grafana_dashboard

Over the grafana-dashboard relation using the grafana-dashboard interface, this Alertmanager charm also provides meaningful dashboards about its metrics to be shown in a Grafana Charm .

In order to add these dashboards to Grafana all that is required is to relate the two charms in the following way:

juju relate alertmanager-k8s:grafana-dashboard grafana-k8s:grafana-dashboard

Grafana source

  grafana-source:
    interface: grafana_datasource

This charm may provide a data source to Grafana through the grafana-source relation using the grafana_datasource interface.

juju relate alertmanager-k8s:grafana-source grafana-k8s:grafana-source

Requires

Ingress

  ingress:
    interface: ingress
    limit: 1

Interactions with the Alertmanager charm can not be assumed to originate within the same Juju model, let alone the same Kubernetes cluster, or even the same Juju cloud. Hence the charm also supports an Ingress relation.

Since Alertmanager units automatically form a cluster, the charm only needs a "per app" Ingress. The ingress relation is available in the traefik-k8s charm and this Alertmanager charm does support that relation over ingress interface.

juju relate alertmanager-k8s:ingress traefik-k8s:ingress

Remote Configuration

  remote-configuration:
    interface: alertmanager_remote_configuration
    limit: 1

Remote Configuration relation offers the option of configuring Alertmanager via relation data. This method assumes usage of another charm providing the configuration (i.e. alertmanager-configurer-k8s).

Remote configuration and local configuration (using charm's config parameters) are mutually exclusive. In case configuration is provided through both channels simultaneously, charm will go to Blocked state, awaiting conflict resolution by the user.

juju relate alertmanager-k8s:remote-configuration SOME_PROVIDER_CHARM:remote-configuration
graph LR

subgraph observability["Observability"]
  alertmanager[Alertmanager]
end

subgraph alertmanager-configurer["Remote Configuration Provider"]
  am_config[alertmanager-configurer-k8s]
end

am_config --->|remote_configuration| alertmanager
user{User} -.-> |REST API CALLS| am_config
Loading