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
1diff --git a/data/prometheus.yaml b/data/prometheus.yaml
2new file mode 100644
3index 0000000..a7bd71c
4--- /dev/null
5+++ b/data/prometheus.yaml
6@@ -0,0 +1,42 @@
7+application: Prometheus
8+repo: prometheus
9+description: >
10+ 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/).
11+version: 2.20.1
12+base: Ubuntu 20.04 LTS
13+architectures:
14+ - amd64
15+ - arm64
16+ - ppc64el
17+ - s390x
18+docker:
19+ parameters:
20+ - -p 30090:9090
21+ access: Access your Prometheus server at `localhost:30090`.
22+parameters:
23+ - type: -e
24+ value: TZ=UTC
25+ description: Timezone.
26+ - type: -p
27+ value: 30090:9090
28+ description: Expose Prometheus server on `localhost:30090`.
29+ - type: -v
30+ value: /path/to/prometheus.yml:/etc/prometheus/prometheus.yml
31+ 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)).
32+ - type: -v
33+ value: /path/to/alerts.yml:/etc/prometheus/alerts.yml
34+ 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)).
35+debug:
36+ - nothing
37+microk8s:
38+ configmap:
39+ files:
40+ - key: prometheus
41+ name: prometheus.yml
42+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/prometheus.yml
43+ - key: prometheus-alerts
44+ name: alerts.yml
45+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/config/alerts.yml
46+ deploy:
47+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/prometheus-deployment.yml
48+ access: You will now be able to connect to the Prometheus on `http://localhost:30090`.
49diff --git a/out/prometheus.md b/out/prometheus.md
50new file mode 100644
51index 0000000..4f11bfb
52--- /dev/null
53+++ b/out/prometheus.md
54@@ -0,0 +1,80 @@
55+# Prometheus | Ubuntu
56+
57+
58+## About Prometheus
59+
60+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/).
61+
62+
63+## Tags and Architectures
64+
65+
66+| Tag | Currently | Architectures |
67+|---|---|---|
68+| `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` |
69+
70+## Usage
71+
72+Launch this image locally:
73+
74+```sh
75+docker run -d --name prometheus-container -e TZ=UTC -p 30090:9090 ubuntu/prometheus:2.x
76+```
77+
78+Access your Prometheus server at `localhost:30090`.
79+
80+#### Parameters
81+
82+| Parameter | Description |
83+|---|---|
84+| `-e TZ=UTC` | Timezone. |
85+| `-p 30090:9090` | Expose Prometheus server on `localhost:30090`. |
86+| `-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)). |
87+| `-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)). |
88+
89+
90+#### Testing/Debugging
91+
92+To debug the container:
93+
94+```sh
95+$ docker logs -f prometheus-container
96+```
97+
98+To get an interactive shell:
99+
100+```sh
101+$ docker exec -it prometheus-container /bin/bash
102+```
103+
104+
105+## Deploy with Kubernetes
106+
107+
108+
109+Works 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`.
110+
111+Download
112+[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
113+[prometheus-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/prometheus/plain/oci/examples/prometheus-deployment.yml). Then:
114+
115+```sh
116+$ kubectl create configmap prometheus-config --from-file=prometheus=prometheus.yml --from-file=prometheus-alerts=alerts.yml
117+$ kubectl apply -f prometheus-deployment.yml
118+```
119+
120+You will now be able to connect to the Prometheus on `http://localhost:30090`.
121+
122+## Bugs and feature requests
123+
124+If you find a bug in our image or want to request a specific feature, please file a bug here:
125+
126+[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
127+
128+Please title the bug "`prometheus: <reason>`".
129+
130+Make sure to include the digest of the image you are using, from:
131+```sh
132+$ docker images --no-trunc --quiet ubuntu/prometheus:<tag>
133+```
134+

Subscribers

People subscribed via source and target branches

to all changes: