Merge ~ballot/prometheus-snap/+git/prometheus-snap:update_2.27.1 into prometheus-snap:master

Proposed by Benjamin Allot
Status: Superseded
Proposed branch: ~ballot/prometheus-snap/+git/prometheus-snap:update_2.27.1
Merge into: prometheus-snap:master
Diff against target: 291 lines (+90/-137) (has conflicts)
4 files modified
.gitignore (+1/-0)
daemon_arguments (+41/-136)
snap_config_wrapper (+1/-1)
snapcraft.yaml (+47/-0)
Conflict in snapcraft.yaml
Reviewer Review Type Date Requested Status
prometheus-snap-developers Pending
Review via email: mp+404380@code.launchpad.net

Commit message

Update prometheus to 2.27.1

* Updated golang to 1.16
* Using latest nodejs LTS version instead of the default provided by
  core20

To post a comment you must log in.

Unmerged commits

41a54ab... by Benjamin Allot

Update prometheus to 2.27.1

* Updated golang to 1.16
* Using latest nodejs LTS version instead of the default provided by
  core20

31696e9... by Sergio Durigan Junior

Update prometheus 2.25.2

This commit also updates the snapcraft to use core20, instead of
core18.

Signed-off-by: Sergio Durigan Junior <email address hidden>

8595033... by Haw Loeung

4k max. open files is not enough

Reviewed-on: https://code.launchpad.net/~hloeung/prometheus-snap/+git/prometheus-snap/+merge/396456
Reviewed-by: Benjamin Allot <email address hidden>

27649cc... by Haw Loeung

4k max. open files is not enough

e9a371e... by Lucas Kanashiro

Update prometheus2 to version 2.20.1

Reviewed-on: https://code.launchpad.net/~canonical-server/prometheus-snap/+git/prometheus-snap/+merge/388843
Reviewed-by: Tom Haddon <email address hidden>
Reviewed-by: Junien Fridrick <email address hidden>

0a1f9cc... by Lucas Kanashiro

Alphabetically sort fields with multiple values

4ecc7a0... by Lucas Kanashiro

Add curl as a build dependency

1fd9074... by Lucas Kanashiro

Build the snap on multiple architectures

fd3c332... by Lucas Kanashiro

Run the tests that not take too long during the build

31f5b0b... by Lucas Kanashiro

Install yarn from npm to build the web app

To build the react app a newer version of yarn is needed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
index 252d247..e9d9154 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
1/*.snap1/*.snap
2/snap/
2/parts/3/parts/
3/stage/4/stage/
4/prime/5/prime/
diff --git a/daemon_arguments b/daemon_arguments
index a1a8e21..6bb5f84 100644
--- a/daemon_arguments
+++ b/daemon_arguments
@@ -4,140 +4,45 @@ ARGS=""
4##############################################################################4##############################################################################
5# WARNINIG: Due to snap confinement the following options should not be set: #5# WARNINIG: Due to snap confinement the following options should not be set: #
6##############################################################################6##############################################################################
7# -config.file7# --config.file
8# -storage.local.path8# --storage.tsdb.path
99
1010# Flags supported by the charm:
11# Prometheus supports the following options:11# --web.listen-address="0.0.0.0:9090"
12# -log.level "info"12# Address to listen on for UI, API, and telemetry.
13# Only log messages with the given severity or above. Valid levels:13# --web.read-timeout=5m Maximum duration before timing out read of the request,
14# [debug, info, warn, error, fatal, panic].14# and closing idle connections.
15#15# --web.max-connections=512 Maximum number of simultaneous connections.
16# == ALERTMANAGER ==16# --web.external-url=<URL> The URL under which Prometheus is externally reachable (for example, if Prometheus
17#17# is served via a reverse proxy). Used for generating relative and absolute links back
18# -alertmanager.http-deadline 10s18# to Prometheus itself. If the URL has a path portion, it will be used to prefix all
19# Alert manager HTTP API timeout.19# HTTP endpoints served by Prometheus. If omitted, relevant URL components will be
20#20# derived automatically.
21# -alertmanager.notification-queue-capacity 10021# --web.route-prefix=<path> Prefix for the internal routes of web endpoints.
22# The capacity of the queue for pending alert manager notifications.22# Defaults to path of --web.external-url.
23#23# --web.user-assets=<path> Path to static asset directory, available at /user.
24# -alertmanager.url24# --web.enable-lifecycle Enable shutdown and reload via HTTP request.
25# The URL of the alert manager to send notifications to.25# --web.enable-admin-api Enables API endpoints for admin control actions.
26#26# --web.console.templates="consoles"
27# == QUERY ==27# Path to the console template directory, available at /consoles.
28#28# --web.console.libraries="console_libraries"
29# -query.max-concurrency 2029# Path to the console library directory.
30# Maximum number of queries executed concurrently.30# --storage.tsdb.min-block-duration=2h
31#31# Minimum duration of a data block before being persisted.
32# -query.staleness-delta 5m0s32# --storage.tsdb.max-block-duration=<duration>
33# Staleness delta allowance during expression evaluations.33# Maximum duration compacted blocks may span. (Defaults to
34#34# 10% of the retention period)
35# -query.timeout 2m0s35# --storage.tsdb.retention=15d
36# Maximum time a query may take before being aborted.36# How long to retain samples in the storage.
37#37# --storage.tsdb.no-lockfile
38# == STORAGE ==38# Do not create lockfile in data directory.
39#39# --alertmanager.notification-queue-capacity=10000
40# -storage.local.checkpoint-dirty-series-limit 500040# The capacity of the queue for pending alert manager notifications.
41# If approx. that many time series are in a state that would require41# --alertmanager.timeout=10s
42# a recovery operation after a crash, a checkpoint is triggered, even if42# Timeout for sending alerts to Alertmanager.
43# the checkpoint interval hasn't passed yet. A recovery operation requires43# --query.lookback-delta=5m The delta difference allowed for retrieving metrics during expression evaluations.
44# a disk seek. The default limit intends to keep the recovery time below44# --query.timeout=2m Maximum time a query may take before being aborted.
45# 1min even on spinning disks. With SSD, recovery is much faster, so you45# --query.max-concurrency=20
46# might want to increase this value in that case to avoid overly frequent46# Maximum number of queries executed concurrently.
47# checkpoints.47# --log.level=info Only log messages with the given severity or above.
48#48# One of: [debug, info, warn, error]
49# -storage.local.checkpoint-interval 5m0s
50# The period at which the in-memory metrics and the chunks not yet
51# persisted to series files are checkpointed.
52#
53# -storage.local.chunk-encoding-version 1
54# Which chunk encoding version to use for newly created chunks.
55# Currently supported is 0 (delta encoding) and 1 (double-delta encoding).
56#
57# -storage.local.dirty false
58# If set, the local storage layer will perform crash recovery even if
59# the last shutdown appears to be clean.
60#
61# -storage.local.index-cache-size.fingerprint-to-metric 10485760
62# The size in bytes for the fingerprint to metric index cache.
63#
64# -storage.local.index-cache-size.fingerprint-to-timerange 5242880
65# The size in bytes for the metric time range index cache.
66#
67# -storage.local.index-cache-size.label-name-to-label-values 10485760
68# The size in bytes for the label name to label values index cache.
69#
70# -storage.local.index-cache-size.label-pair-to-fingerprints 20971520
71# The size in bytes for the label pair to fingerprints index cache.
72#
73# -storage.local.max-chunks-to-persist 1048576
74# How many chunks can be waiting for persistence before sample
75# ingestion will stop. Many chunks waiting to be persisted will increase
76# the checkpoint size.
77#
78# -storage.local.memory-chunks 1048576
79# How many chunks to keep in memory. While the size of a chunk is
80# 1kiB, the total memory usage will be significantly higher than this value
81# * 1kiB. Furthermore, for various reasons, more chunks might have to be
82# kept in memory temporarily.
83#
84# -storage.local.pedantic-checks false
85# If set, a crash recovery will perform checks on each series file.
86# This might take a very long time.
87#
88# -storage.local.retention 360h0m0s
89# How long to retain samples in the local storage.
90#
91# -storage.local.series-sync-strategy "adaptive"
92# When to sync series files after modification. Possible values:
93# 'never', 'always', 'adaptive'. Sync'ing slows down storage performance
94# but reduces the risk of data loss in case of an OS crash. With the
95# 'adaptive' strategy, series files are sync'd for as long as the storage
96# is not too much behind on chunk persistence.
97#
98# -storage.remote.influxdb-url
99# The URL of the remote InfluxDB server to send samples to. None, if
100# empty.
101#
102# -storage.remote.influxdb.database "prometheus"
103# The name of the database to use for storing samples in InfluxDB.
104#
105# -storage.remote.influxdb.retention-policy "default"
106# The InfluxDB retention policy to use.
107#
108# -storage.remote.opentsdb-url
109# The URL of the remote OpenTSDB server to send samples to. None, if
110# empty.
111#
112# -storage.remote.timeout 30s
113# The timeout to use when sending samples to the remote storage.
114#
115# == WEB ==
116#
117# -web.console.libraries "/etc/prometheus/console_libraries"
118# Path to the console library directory.
119#
120# -web.console.templates "/etc/prometheus/consoles"
121# Path to the console template directory, available at /consoles.
122#
123# -web.enable-remote-shutdown false
124# Enable remote service shutdown.
125#
126# -web.external-url
127# The URL under which Prometheus is externally reachable (for
128# example, if Prometheus is served via a reverse proxy). Used for
129# generating relative and absolute links back to Prometheus itself. If
130# omitted, relevant URL components will be derived automatically.
131#
132# -web.listen-address ":9090"
133# Address to listen on for the web interface, API, and telemetry.
134#
135# -web.local-assets "/usr/share/prometheus/web/"
136# Path to static assets/templates directory.
137#
138# -web.telemetry-path "/metrics"
139# Path under which to expose metrics.
140#
141# -web.user-assets
142# Path to static asset directory, available at /user.
143#
diff --git a/snap_config_wrapper b/snap_config_wrapper
index 0283233..ae4d288 100755
--- a/snap_config_wrapper
+++ b/snap_config_wrapper
@@ -6,4 +6,4 @@ test -d $SNAP_DATA/promreg || mkdir $SNAP_DATA/promreg
66
7ulimit -n 655367ulimit -n 65536
8. $SNAP_DATA/daemon_arguments8. $SNAP_DATA/daemon_arguments
9$SNAP/bin/prometheus $ARGS -config.file=$SNAP_DATA/prometheus.yml -storage.local.path=$SNAP_COMMON9$SNAP/bin/prometheus $ARGS --config.file=$SNAP_DATA/prometheus.yml --storage.tsdb.path=$SNAP_COMMON
diff --git a/snapcraft.yaml b/snapcraft.yaml
index f721fc7..6b52e90 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,10 +1,21 @@
1name: prometheus1name: prometheus
2<<<<<<< snapcraft.yaml
2version: 1.8.23version: 1.8.2
4=======
5version: 2.27.1
6base: core20
7>>>>>>> snapcraft.yaml
3grade: stable8grade: stable
4summary: The Prometheus monitoring system and time series database9summary: The Prometheus monitoring system and time series database
5description: |10description: |
6 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.11 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.
7confinement: strict12confinement: strict
13architectures:
14 - build-on: amd64
15 - build-on: arm64
16 - build-on: ppc64el
17 - build-on: s390x
18
8apps:19apps:
9 prometheus:20 prometheus:
10 command: 'bin/prometheus.wrapper'21 command: 'bin/prometheus.wrapper'
@@ -12,15 +23,20 @@ apps:
12 daemon: simple23 daemon: simple
13 stop-timeout: 1800s24 stop-timeout: 1800s
14 promtool:25 promtool:
26 plugs: [home]
15 command: 'bin/promtool'27 command: 'bin/promtool'
16plugs:28plugs:
17 content:29 content:
30 interface: content
18 content: promreg31 content: promreg
19 target: $SNAP_DATA/promreg32 target: $SNAP_DATA/promreg
33
20parts:34parts:
21 prometheus:35 prometheus:
22 plugin: go36 plugin: go
37 go-channel: 1.16/stable
23 source: https://github.com/prometheus/prometheus.git38 source: https://github.com/prometheus/prometheus.git
39<<<<<<< snapcraft.yaml
24 source-tag: v1.8.240 source-tag: v1.8.2
25 go-importpath: github.com/prometheus/prometheus41 go-importpath: github.com/prometheus/prometheus
26 build-packages: [golang-1.8]42 build-packages: [golang-1.8]
@@ -46,6 +62,37 @@ parts:
46 - etc/prometheus/prometheus.yml.example62 - etc/prometheus/prometheus.yml.example
47 prime:63 prime:
48 - etc/prometheus/prometheus.yml.example64 - etc/prometheus/prometheus.yml.example
65=======
66 source-tag: v${SNAPCRAFT_PROJECT_VERSION}
67 build-packages:
68 - apt
69 - build-essential
70 - curl
71 - gnupg
72 - lsb-release
73 - make
74 - software-properties-common
75 override-build: |
76 # This needs a node >= 12.0 and node package is 10.0.19
77 # Manually configuring the debian package from nodesource for nodejs LTS release
78 # Not using their "curl xxx | sudo bash -" attrocity
79 # See https://deb.nodesource.com/setup_14.x
80 SERIE="$(lsb_release --codename --short)"
81 curl https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /tmp/nodesource.key
82 apt-key add /tmp/nodesource.key
83 add-apt-repository --yes --update "deb https://deb.nodesource.com/node_14.x ${SERIE} main"
84 apt-get install -y nodejs
85 set -x
86 NODE_ENV="production"
87 npm install yarn -g
88 make common-test-short
89 make build
90 mkdir -p $SNAPCRAFT_PART_INSTALL/bin
91 mkdir -p $SNAPCRAFT_PART_INSTALL/etc/prometheus
92 cp -p $SNAPCRAFT_PART_BUILD/promtool $SNAPCRAFT_PART_INSTALL/bin/
93 cp -p $SNAPCRAFT_PART_BUILD/prometheus $SNAPCRAFT_PART_INSTALL/bin/
94 cp -p $SNAPCRAFT_PART_SRC/documentation/examples/prometheus.yml $SNAPCRAFT_PART_INSTALL/etc/prometheus/prometheus.yml.example
95>>>>>>> snapcraft.yaml
49 snap-wrappers:96 snap-wrappers:
50 plugin: dump97 plugin: dump
51 source: .98 source: .

Subscribers

People subscribed via source and target branches