Charmed PostgreSQL VM

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 239 09 Feb 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 226 01 Apr 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
14/stable 430 28 Jun 2024
Ubuntu 22.04
14/stable 429 28 Jun 2024
Ubuntu 22.04
14/candidate 429 26 Jun 2024
Ubuntu 22.04
14/candidate 430 26 Jun 2024
Ubuntu 22.04
14/beta 430 26 Jun 2024
Ubuntu 22.04
14/beta 429 26 Jun 2024
Ubuntu 22.04
14/edge 436 10 Jul 2024
Ubuntu 22.04
14/edge 435 10 Jul 2024
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04 14.04

How to enable COS Alert Rules

Charmed PostgreSQL VM ships a pre-configured and pre-enabled list of Awesome Alert Rules:

This guide will show how to set up Pushover to receive alert notifications from the COS Alert Manager.

For information about accessing and managing COS Alert Rules, refer to the COS documentation.

Prerequisites

Enable COS alerts for Pushover

The following section is an example of the Pushover alerts aggregator.

The first step is to create a new account on Pushover (or use an existing one). The goal is to have the ‘user key’ and ‘token’ to authorize alerts for the Pushover application. Follow this straightforward Pushover guide.

Next, create a new COS Alert Manager config (replace user_key and token with yours):

cat > myalert.yaml << EOF
global:
  resolve_timeout: 5m
  http_config:
    follow_redirects: true
    enable_http2: true
route:
  receiver: placeholder
  group_by:
  - juju_model_uuid
  - juju_application
  - juju_model
  continue: false
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 1h
receivers:
- name: placeholder
  pushover_configs:
    - user_key: <relace_with_your_user_key>
      token: <relace_with_your_token>
      url: http://<relace_with_grafana_public_ip>/cos-grafana/alerting/list
      title: "{{ range .Alerts }}{{ .Labels.severity }} - {{ if .Labels.juju_unit }}{{ .Labels.juju_unit }}{{ else }}{{ .Labels.juju_application }}{{ end }} in model {{ .Labels.juju_model }}: {{ .Labels.alertname }} {{ end }}"
      message: "{{ range .Alerts }} Job: {{ .Labels.job }} Instance: {{ .Labels.instance }} {{ end }}"
templates: []
EOF

Upload and apply newly the created alert manager config:

juju switch <k8s_cos_controller>:<cos_model_name>
juju config alertmanager config_file=@myalert.yaml

At this stage, the COS Alert Manager will start sending alert notifications to Pushover. Users can receive them on all supported Pushover clients/apps.

The image below shows an example of the Pushover web client:

Alert receivers

The similar way as above, COS alerts can be send to the long list of supported receivers.

Do you have questions? Contact us!


Help improve this document in the forum (guidelines). Last updated 5 months ago.