Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:prometheus into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: af4c0fdc32ad952f707b3938c7d030732f2cc115
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:prometheus
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 134 lines (+122/-0)
2 files modified
data/prometheus.yaml (+42/-0)
out/prometheus.md (+80/-0)
Reviewer Review Type Date Requested Status
Valentin Viennot (community) Approve
Canonical Server Pending
Review via email: mp+394280@code.launchpad.net

Description of the change

Prometheus data (needed to generate the README file) and the corresponding prometheus.md (generated from the data).

To post a comment you must log in.
Revision history for this message
Valentin Viennot (valentinviennot) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/data/prometheus.yaml b/data/prometheus.yaml
0new file mode 1006440new file mode 100644
index 0000000..a7bd71c
--- /dev/null
+++ b/data/prometheus.yaml
@@ -0,0 +1,42 @@
1application: Prometheus
2repo: prometheus
3description: >
4 Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. Read more on the [Prometheus website](https://prometheus.io/).
5version: 2.20.1
6base: Ubuntu 20.04 LTS
7architectures:
8 - amd64
9 - arm64
10 - ppc64el
11 - s390x
12docker:
13 parameters:
14 - -p 30090:9090
15 access: Access your Prometheus server at `localhost:30090`.
16parameters:
17 - type: -e
18 value: TZ=UTC
19 description: Timezone.
20 - type: -p
21 value: 30090:9090
22 description: Expose Prometheus server on `localhost:30090`.
23 - type: -v
24 value: /path/to/prometheus.yml:/etc/prometheus/prometheus.yml
25 description: Local [configuration file](https://prometheus.io/docs/prometheus/2.20/configuration/configuration/) `prometheus.yml` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/prometheus.yml)).
26 - type: -v
27 value: /path/to/alerts.yml:/etc/prometheus/alerts.yml
28 description: Local [alert configuration file](https://prometheus.io/docs/prometheus/2.20/configuration/configuration/) `alerts.yml` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/alerts.yml)).
29debug:
30 - nothing
31microk8s:
32 configmap:
33 files:
34 - key: prometheus
35 name: prometheus.yml
36 link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/prometheus.yml
37 - key: prometheus-alerts
38 name: alerts.yml
39 link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/alerts.yml
40 deploy:
41 link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/prometheus-deployment.yml
42 access: You will now be able to connect to the Prometheus on `http://localhost:30090`.
diff --git a/out/prometheus.md b/out/prometheus.md
0new file mode 10064443new file mode 100644
index 0000000..4f11bfb
--- /dev/null
+++ b/out/prometheus.md
@@ -0,0 +1,80 @@
1# Prometheus | Ubuntu
2
3
4## About Prometheus
5
6Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. Read more on the [Prometheus website](https://prometheus.io/).
7
8
9## Tags and Architectures
10
11
12| Tag | Currently | Architectures |
13|---|---|---|
14| `2.x`    ![BETA](https://assets.ubuntu.com/v1/e8ac33d1-header-beta-flag.svg) | Prometheus 2.20.1 on Ubuntu 20.04 LTS | `amd64`, `arm64`, `ppc64el`, `s390x` |
15
16## Usage
17
18Launch this image locally:
19
20```sh
21docker run -d --name prometheus-container -e TZ=UTC -p 30090:9090 ubuntu/prometheus:2.x
22```
23
24Access your Prometheus server at `localhost:30090`.
25
26#### Parameters
27
28| Parameter | Description |
29|---|---|
30| `-e TZ=UTC` | Timezone. |
31| `-p 30090:9090` | Expose Prometheus server on `localhost:30090`. |
32| `-v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml` | Local [configuration file](https://prometheus.io/docs/prometheus/2.20/configuration/configuration/) `prometheus.yml` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/prometheus.yml)). |
33| `-v /path/to/alerts.yml:/etc/prometheus/alerts.yml` | Local [alert configuration file](https://prometheus.io/docs/prometheus/2.20/configuration/configuration/) `alerts.yml` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/alerts.yml)). |
34
35
36#### Testing/Debugging
37
38To debug the container:
39
40```sh
41$ docker logs -f prometheus-container
42```
43
44To get an interactive shell:
45
46```sh
47$ docker exec -it prometheus-container /bin/bash
48```
49
50
51## Deploy with Kubernetes
52
53
54
55Works with any Kubernetes; if you don't have one, we recommend you [install MicroK8s](https://microk8s.io/) and `microk8s enable dns storage` then alias `kubectl` to `microk8s.kubectl`.
56
57Download
58[prometheus.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/prometheus.yml), [alerts.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/alerts.yml), and
59[prometheus-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/prometheus-deployment.yml). Then:
60
61```sh
62$ kubectl create configmap prometheus-config --from-file=prometheus=prometheus.yml --from-file=prometheus-alerts=alerts.yml
63$ kubectl apply -f prometheus-deployment.yml
64```
65
66You will now be able to connect to the Prometheus on `http://localhost:30090`.
67
68## Bugs and feature requests
69
70If you find a bug in our image or want to request a specific feature, please file a bug here:
71
72[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
73
74Please title the bug "`prometheus: <reason>`".
75
76Make sure to include the digest of the image you are using, from:
77```sh
78$ docker images --no-trunc --quiet ubuntu/prometheus:<tag>
79```
80

Subscribers

People subscribed via source and target branches

to all changes: