Compare commits
107 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d9dfa47cf6 | ||
|
6ccf1e6d25 | ||
|
c8facf0e6d | ||
|
ea0c262cfd | ||
|
a5b6a658d2 | ||
|
bba9930f9c | ||
|
ae267aea7c | ||
|
269ba2edab | ||
|
8e35c302bd | ||
|
2939d1238d | ||
|
1a307f201b | ||
|
097e2e1506 | ||
|
93c4cd3dba | ||
|
e04a451442 | ||
|
445a399441 | ||
|
056fae6220 | ||
|
bb29e0c71e | ||
|
d315eff0c6 | ||
|
0c50f94950 | ||
|
1429d39995 | ||
|
a70075d0d2 | ||
|
69330a92e2 | ||
|
4945dfd4e9 | ||
|
db40ae2556 | ||
|
fad48a51d9 | ||
|
cefc8a5cde | ||
|
985d007783 | ||
|
548804b068 | ||
|
7cfe7beba6 | ||
|
c6d53c9f04 | ||
|
831b93e872 | ||
|
4032fed24e | ||
|
d6455720b6 | ||
|
535a255c68 | ||
|
508b28a216 | ||
|
c1e4b148f0 | ||
|
28481cec26 | ||
|
51a23dd65d | ||
|
705828756c | ||
|
4c8e6b318c | ||
|
992c288b93 | ||
|
059fc273f1 | ||
|
ed82c69743 | ||
|
8bcbc05391 | ||
|
35c74911e9 | ||
|
f1ad90a8bc | ||
|
e42ce603c8 | ||
|
ee3ed6fdb6 | ||
|
73b1594701 | ||
|
c565740dc1 | ||
|
28684a3c47 | ||
|
a42ce3d5d1 | ||
|
9501d67ead | ||
|
bdc99e5e92 | ||
|
a37d91dad2 | ||
|
c2925f1e4a | ||
|
b5caa0c191 | ||
|
8f7cd30106 | ||
|
4dcb76b0e2 | ||
|
2caf79c441 | ||
|
0b75472e6a | ||
|
523fb48df3 | ||
|
b7240f4b23 | ||
|
1d62781790 | ||
|
f209e3e77f | ||
|
fe72ecea92 | ||
|
ed6c06d0d7 | ||
|
f9f53ce26e | ||
|
ddce2d3fa6 | ||
|
27845b75b1 | ||
|
dbe03a91d4 | ||
|
2bb246ed5e | ||
|
cb8c4c8c55 | ||
|
9cfe27a7ca | ||
|
15433b4cec | ||
|
0b3c76f2dc | ||
|
88069bd439 | ||
|
fb1c9b4c2c | ||
|
18bead432d | ||
|
cb3ba472cf | ||
|
302d0bf88a | ||
|
311e612f4c | ||
|
4d6f175ce4 | ||
|
462354ee32 | ||
|
143b38fdf3 | ||
|
d0ea08bccc | ||
|
21f9df10ae | ||
|
8f61a932aa | ||
|
cdeb272470 | ||
|
14a1225312 | ||
|
f8dd03292c | ||
|
c889592075 | ||
|
d8bd5f4943 | ||
|
8bd1fcf4e8 | ||
|
eb41984597 | ||
|
b6526ddc76 | ||
|
bcf067b152 | ||
|
e1a6fa7e78 | ||
|
9beddae148 | ||
|
26c0f349a5 | ||
|
6d59fe4745 | ||
|
0dc0135b80 | ||
|
2d4c8a3076 | ||
|
a5bf994bdb | ||
|
6d1c8b7543 | ||
|
623d5742bf | ||
|
7848ad4753 |
12 changed files with 2842 additions and 29 deletions
|
@ -1,5 +1,3 @@
|
|||
.git
|
||||
.gitignore
|
||||
.dockerignore
|
||||
node_modules
|
||||
test/
|
||||
screenshots/
|
||||
|
||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules/
|
|
@ -1,9 +0,0 @@
|
|||
[0.1.0]
|
||||
* Initial version
|
||||
|
||||
[0.2.0]
|
||||
* Fix app title
|
||||
|
||||
[0.3.0]
|
||||
* Fix first run command
|
||||
|
307
CHANGELOG.md
Normal file
307
CHANGELOG.md
Normal file
|
@ -0,0 +1,307 @@
|
|||
[0.1.0]
|
||||
* Initial version
|
||||
|
||||
[0.2.0]
|
||||
* Fix app title
|
||||
|
||||
[0.3.0]
|
||||
* Fix first run command
|
||||
|
||||
[1.0.0]
|
||||
* Initial stable version
|
||||
|
||||
[1.1.0]
|
||||
* Use base image v3
|
||||
|
||||
[1.2.0]
|
||||
* Update prometheus to 2.23.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.23.0)
|
||||
* UI: Make the React UI default. #8142
|
||||
* Remote write: The following metrics were removed/renamed in remote write. #6815
|
||||
* Remote: Do not collect non-initialized timestamp metrics. #8060
|
||||
* Remote write: Added a metric prometheus_remote_storage_max_samples_per_send for remote write. #8102
|
||||
* TSDB: Make the snapshot directory name always the same length. #8138
|
||||
* TSDB: Create a checkpoint only once at the end of all head compactions. #8067
|
||||
* TSDB: Avoid Series API from hitting the chunks. #8050
|
||||
* TSDB: Cache label name and last value when adding series during compactions making compactions faster. #8192
|
||||
|
||||
[1.3.0]
|
||||
* Update Prometheus to 2.24.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.24.0)
|
||||
|
||||
[1.4.0]
|
||||
* Update Prometheus to 2.25.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.25.0)
|
||||
* Add optional name property to testgroup for better test failure output. #8440
|
||||
* Add warnings into React Panel on the Graph page. #8427
|
||||
* TSDB: Increase the number of buckets for the compaction duration metric. #8342
|
||||
* Remote: Allow passing along custom remote_write HTTP headers. #8416
|
||||
* Mixins: Scope grafana configuration. #8332
|
||||
|
||||
[1.4.1]
|
||||
* Update Prometheus to 2.25.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.25.2)
|
||||
* Fix the ingestion of scrapes when the wall clock changes, e.g. on suspend
|
||||
* Enable basicAuth so it can work with apps like grafana
|
||||
|
||||
[1.5.0]
|
||||
* Update Prometheus to 2.26.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.26.0)
|
||||
* Remote: Add support for AWS SigV4 auth method for remote_write. #8509
|
||||
* Scaleway Discovery: Add Scaleway Service Discovery. #8555
|
||||
* PromQL: Allow negative offsets. Behind --enable-feature=promql-negative-offset flag. #8487
|
||||
* experimental Exemplars: Add in-memory storage for exemplars. Behind --enable-feature=exemplar-storage flag. #6635
|
||||
* UI: Add advanced auto-completion, syntax highlighting and linting to graph page query input. #8634
|
||||
|
||||
[1.6.0]
|
||||
* Update Prometheus to 2.27.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.27.0)
|
||||
* UI: Add a dark theme. #8604
|
||||
|
||||
[1.6.1]
|
||||
* Update Prometheus to 2.27.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.27.1)
|
||||
|
||||
[1.7.0]
|
||||
* Update Prometheus to 2.28.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.28.0)
|
||||
* [CHANGE] UI: Make the new experimental PromQL editor the default. #8925
|
||||
* [FEATURE] Linode SD: Add Linode service discovery. #8846
|
||||
* [FEATURE] HTTP SD: Add generic HTTP-based service discovery. #8839
|
||||
* [FEATURE] Kubernetes SD: Allow configuring API Server access via a kubeconfig file. #8811
|
||||
* [FEATURE] UI: Add exemplar display support to the graphing interface. #8832 #8945 #8929
|
||||
* [FEATURE] Consul SD: Add namespace support for Consul Enterprise. #8900
|
||||
* [ENHANCEMENT] Promtool: Allow silencing output when importing / backfilling data. #8917
|
||||
* [ENHANCEMENT] Consul SD: Support reading tokens from file. #8926
|
||||
* [ENHANCEMENT] Rules: Add a new .ExternalURL alert field templating variable, containing the external URL of the Prometheus server. #8878
|
||||
* [ENHANCEMENT] Scrape: Add experimental body_size_limit scrape configuration setting to limit the allowed response body size for target scrapes. #8833 #8886
|
||||
|
||||
[1.7.1]
|
||||
* Update Prometheus to 2.28.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.28.1)
|
||||
* [BUGFIX]: HTTP SD: Allow charset specification in Content-Type header. #8981
|
||||
* [BUGFIX]: HTTP SD: Fix handling of disappeared target groups. #9019
|
||||
* [BUGFIX]: Fix incorrect log-level handling after moving to go-kit/log. #9021
|
||||
|
||||
[1.8.0]
|
||||
* Update Prometheus to 2.29.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.29.0)
|
||||
|
||||
[1.8.1]
|
||||
* Update Prometheus to 2.29.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.29.1)
|
||||
|
||||
[1.8.2]
|
||||
* Update Prometheus to 2.29.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.29.2)
|
||||
|
||||
[1.9.0]
|
||||
* Update Prometheus to 2.30.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.30.0)
|
||||
|
||||
[1.9.1]
|
||||
* Update Prometheus to 2.30.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.30.1)
|
||||
|
||||
[1.9.2]
|
||||
* Update Prometheus to 2.30.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.30.2)
|
||||
|
||||
[1.9.3]
|
||||
* Update Prometheus to 2.30.3
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.30.3)
|
||||
|
||||
[1.9.4]
|
||||
* Set default retention_time to 15 days
|
||||
|
||||
[1.9.5]
|
||||
* Update Prometheus to 2.31.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.31.0)
|
||||
* [CHANGE] UI: Remove standard PromQL editor in favour of the codemirror-based editor. #9452
|
||||
* [FEATURE] PromQL: Add trigonometric functions and atan2 binary operator. #9239 #9248 #9515
|
||||
* [FEATURE] Remote: Add support for exemplar in the remote write receiver endpoint. #9319 #9414
|
||||
* [FEATURE] SD: Add PuppetDB service discovery. #8883
|
||||
* [FEATURE] SD: Add Uyuni service discovery. #8190
|
||||
* [FEATURE] Web: Add support for security-related HTTP headers. #9546
|
||||
* [ENHANCEMENT] Azure SD: Add proxy_url, follow_redirects, tls_config. #9267
|
||||
* [ENHANCEMENT] Backfill: Add --max-block-duration in promtool create-blocks-from rules. #9511
|
||||
* [ENHANCEMENT] Config: Print human-readable sizes with unit instead of raw numbers. #9361
|
||||
* [ENHANCEMENT] HTTP: Re-enable HTTP/2. #9398
|
||||
* [ENHANCEMENT] Kubernetes SD: Warn user if number of endpoints exceeds limit. #9467
|
||||
* [ENHANCEMENT] OAuth2: Add TLS configuration to token requests. #9550
|
||||
* [ENHANCEMENT] PromQL: Several optimizations. #9365 #9360 #9362 #9552
|
||||
* [ENHANCEMENT] PromQL: Make aggregations deterministic in instant queries. #9459
|
||||
* [ENHANCEMENT] Rules: Add the ability to limit number of alerts or series. #9260 #9541
|
||||
* [ENHANCEMENT] SD: Experimental discovery manager to avoid restarts upon reload. Disabled by default, enable with flag --enable-feature=new-service-discovery-manager. #9349 #9537
|
||||
* [ENHANCEMENT] UI: Debounce timerange setting changes. #9359
|
||||
* [BUGFIX] Backfill: Apply rule labels after query labels. #9421
|
||||
* [BUGFIX] Scrape: Resolve conflicts between multiple exported label prefixes. #9479 #9518
|
||||
* [BUGFIX] Scrape: Restart scrape loops when __scrape_interval__ is changed. #9551
|
||||
* [BUGFIX] TSDB: Fix memory leak in samples deletion. #9151
|
||||
* [BUGFIX] UI: Use consistent margin-bottom for all alert kinds. #9318
|
||||
|
||||
[1.9.6]
|
||||
* Update Prometheus to 2.31.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.31.1)
|
||||
* Fix a panic when the experimental discovery manager receive targets during a reload
|
||||
|
||||
[1.9.7]
|
||||
* Update Prometheus to 2.31.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.31.1)
|
||||
|
||||
[1.10.0]
|
||||
* Update Prometheus to 2.32.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.32.0)
|
||||
|
||||
[1.10.1]
|
||||
* Update Prometheus to 2.32.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.32.1)
|
||||
|
||||
[1.11.0]
|
||||
* Update Prometheus to 2.33.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.0)
|
||||
|
||||
[1.11.1]
|
||||
* Update Prometheus to 2.33.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.1)
|
||||
|
||||
[1.11.2]
|
||||
* Update Prometheus to 2.33.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.2)
|
||||
|
||||
[1.11.3]
|
||||
* Update Prometheus to 2.33.3
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.3)
|
||||
|
||||
[1.11.4]
|
||||
* Update Prometheus to 2.33.4
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.4)
|
||||
|
||||
[1.12.0]
|
||||
* Update Prometheus to 2.33.5
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.33.5)
|
||||
|
||||
[1.13.0]
|
||||
* Update Prometheus to 2.34.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.34.0)
|
||||
* TSDB: Disable the chunk write queue by default and allow configuration with the experimental flag --storage.tsdb.head-chunks-write-queue-size. #10425
|
||||
* HTTP SD: Add a failure counter. #10372
|
||||
* Azure SD: Set Prometheus User-Agent on requests. #10209
|
||||
* Uyuni SD: Reduce the number of logins to Uyuni. #10072
|
||||
* Scrape: Log when an invalid media type is encountered during a scrape. #10186
|
||||
* Scrape: Accept application/openmetrics-text;version=1.0.0 in addition to version=0.0.1. #9431
|
||||
* Remote-read: Add an option to not use external labels as selectors for remote read. #10254
|
||||
* UI: Optimize the alerts page and add a search bar. #10142
|
||||
* UI: Improve graph colors that were hard to see. #10179
|
||||
* Config: Allow escaping of $ with $$ when using environment variables with external labels. #10129
|
||||
|
||||
[1.13.1]
|
||||
* Update Prometheus to 2.35.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.35.0)
|
||||
|
||||
[1.14.0]
|
||||
* Update Prometheus to 2.36.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.36.0)
|
||||
* [FEATURE] Add lowercase and uppercase relabel action. #10641
|
||||
* [FEATURE] SD: Add IONOS Cloud integration. #10514
|
||||
* [FEATURE] SD: Add Vultr integration. #10714
|
||||
* [FEATURE] SD: Add Linode SD failure count metric. #10673
|
||||
* [FEATURE] Add prometheus_ready metric. #10682
|
||||
* [ENHANCEMENT] Add stripDomain to template function. #10475
|
||||
* [ENHANCEMENT] UI: Enable active search through dropped targets. #10668
|
||||
* [ENHANCEMENT] promtool: support matchers when querying label values. #10727
|
||||
* [ENHANCEMENT] Add agent mode identifier. #9638
|
||||
* [BUGFIX] Changing TotalQueryableSamples from int to int64. #10549
|
||||
* [BUGFIX] tsdb/agent: Ignore duplicate exemplars. #10595
|
||||
* [BUGFIX] TSDB: Fix chunk overflow appending samples at a variable rate. #10607
|
||||
* [BUGFIX] Stop rule manager before TSDB is stopped. #10680
|
||||
|
||||
[1.14.1]
|
||||
* Update Prometheus to 2.36.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.36.1)
|
||||
* [BUGFIX] promtool: Add --lint-fatal option #10840
|
||||
|
||||
[1.14.2]
|
||||
* Update Prometheus to 2.36.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.36.2)
|
||||
* [BUGFIX] Fix serving of static assets like fonts and favicon. #10888
|
||||
|
||||
[1.15.0]
|
||||
* Update Prometheus to 2.37.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.37.0)
|
||||
* Nomad SD: New service discovery for Nomad built-in service discovery. #10915
|
||||
* Kubernetes SD: Allow attaching node labels for endpoint role. #10759
|
||||
* PromQL: Optimise creation of signature with/without labels. #10667
|
||||
* TSDB: Memory optimizations. #10873 #10874
|
||||
* TSDB: Reduce sleep time when reading WAL. #10859 #10878
|
||||
* OAuth2: Add appropriate timeouts and User-Agent header. #11020
|
||||
|
||||
[1.16.0]
|
||||
* Update Prometheus to 2.38.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.38.0)
|
||||
* Web: Add a /api/v1/format_query HTTP API endpoint that allows pretty-formatting PromQL expressions. #11036 #10544 #11005
|
||||
* UI: Add support for formatting PromQL expressions in the UI. #11039
|
||||
* DNS SD: Support MX records for discovering targets. #10099
|
||||
* Templates: Add toTime() template function that allows converting sample timestamps to Go time.Time values. #10993
|
||||
* PromQL: When a query panics, also log the query itself alongside the panic message. #10995
|
||||
|
||||
[1.17.0]
|
||||
* Update Prometheus to 2.39.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.39.0)
|
||||
* experimental TSDB: Add support for ingesting out-of-order samples. This is configured via out_of_order_time_window field in the config file; check config file docs for more info. #11075
|
||||
* API: /-/healthy and /-/ready API calls now also respond to a HEAD request on top of existing GET support. #11160
|
||||
* PuppetDB SD: Add __meta_puppetdb_query label. #11238
|
||||
* AWS EC2 SD: Add __meta_ec2_region label. #11326
|
||||
* AWS Lightsail SD: Add __meta_lightsail_region label. #11326
|
||||
* Scrape: Optimise relabeling by re-using memory. #11147
|
||||
* TSDB: Improve WAL replay timings. #10973 #11307 #11319
|
||||
* TSDB: Optimise memory by not storing unnecessary data in the memory. #11280 #11288 #11296
|
||||
* TSDB: Allow overlapping blocks by default. --storage.tsdb.allow-overlapping-blocks now has no effect. #11331
|
||||
* UI: Click to copy label-value pair from query result to clipboard. #11229
|
||||
|
||||
[1.17.1]
|
||||
* Update Prometheus to 2.39.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.39.1)
|
||||
* [BUGFIX] Rules: Fix notifier relabel changing the labels on active alerts. #11427
|
||||
|
||||
[1.18.0]
|
||||
* Update Prometheus to 2.40.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.0)
|
||||
|
||||
[1.18.1]
|
||||
* Update Prometheus to 2.40.1
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.1)
|
||||
|
||||
[1.18.2]
|
||||
* Update Prometheus to 2.40.2
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.2)
|
||||
|
||||
[1.18.3]
|
||||
* Update Prometheus to 2.40.3
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.3)
|
||||
* TSDB: Fix compaction after a deletion is called. #11623
|
||||
|
||||
[1.18.4]
|
||||
* Update Prometheus to 2.40.4
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.4)
|
||||
* Fix Basic Authentication Bypass (CVE-2022-46146)
|
||||
|
||||
[1.18.5]
|
||||
* Update Prometheus to 2.40.5
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.5)
|
||||
* [BUGFIX] TSDB: Fix queries involving native histograms due to improper reset of iterators. #11643
|
||||
|
||||
[1.18.6]
|
||||
* Update Prometheus to 2.40.6
|
||||
* Update Coudron base image to 4.0.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.6)
|
||||
|
||||
[1.18.7]
|
||||
* Update Prometheus to 2.40.7
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.40.7)
|
||||
* [BUGFIX] TSDB: Fix queries involving negative buckets of native histograms. #11699
|
||||
|
||||
[1.19.0]
|
||||
* Update Prometheus to 2.41.0
|
||||
* [Full changelog](https://github.com/prometheus/prometheus/releases/tag/v2.41.0)
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"version": "0.3.0-1",
|
||||
"version": "1.19.0",
|
||||
"upstreamVersion": "2.41.0",
|
||||
"id": "io.prometheus.cloudronapp",
|
||||
"title": "Prometheus Server",
|
||||
"author": "Erik Tadevosyan",
|
||||
|
@ -9,15 +10,18 @@
|
|||
"httpPort": 9090,
|
||||
"icon": "logo.png",
|
||||
"addons": {
|
||||
"localstorage": {}
|
||||
"localstorage": {},
|
||||
"proxyAuth": {
|
||||
"basicAuth": true
|
||||
}
|
||||
},
|
||||
"manifestVersion": 2,
|
||||
"website": "https://prometheus.io/",
|
||||
"contactEmail": "support@cloudron.io",
|
||||
"tags": [ "metrics", "analytics", "graphite", "collect", "graphs" ],
|
||||
"changelog": "file://CHANGELOG",
|
||||
"documentationUrl": "https://docs.cloudron.io/apps/prometheus-server/",
|
||||
"minBoxVersion": "5.5.0",
|
||||
"changelog": "file://CHANGELOG.md",
|
||||
"documentationUrl": "https://docs.cloudron.io/apps/prometheus/",
|
||||
"minBoxVersion": "7.1.0",
|
||||
"forumUrl": "https://forum.cloudron.io/category/112/prometheus",
|
||||
"mediaLinks": [
|
||||
"https://screenshots.cloudron.io/io.prometheus.cloudronapp/1.png",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
This app packages Prometheus <upstream>2.22.0</upstream>
|
||||
## About
|
||||
|
||||
Prometheus, a Cloud Native Computing Foundation project, is a systems and service monitoring system.
|
||||
It collects metrics from configured targets at given intervals, evaluates rule expressions, displays
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
|
||||
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
|
||||
|
||||
RUN mkdir -p /app/code
|
||||
RUN mkdir -p /app/code /app/pkg
|
||||
WORKDIR /app/code
|
||||
|
||||
ARG VERSION=2.22.0
|
||||
ARG VERSION=2.41.0
|
||||
|
||||
# install Prometheus
|
||||
RUN curl -L https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz | tar zxvf - --strip-components 1
|
||||
|
||||
COPY start.sh /app/pkg/
|
||||
COPY default_prometheus_variables.sh start.sh /app/pkg/
|
||||
|
||||
CMD [ "/app/pkg/start.sh" ]
|
||||
|
|
4
default_prometheus_variables.sh
Executable file
4
default_prometheus_variables.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
# https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
|
||||
export retention_time="15d"
|
18
start.sh
18
start.sh
|
@ -4,12 +4,20 @@ set -eu
|
|||
|
||||
mkdir -p /app/data/runtime /app/data/config
|
||||
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
if [[ ! -f /app/data/config/prometheus.yml ]]; then
|
||||
echo "=> Creating config file on first run"
|
||||
sudo -u cloudron cp -n /app/code/prometheus.yml /app/data/config/prometheus.yml
|
||||
cp /app/code/prometheus.yml /app/data/config/prometheus.yml
|
||||
fi
|
||||
|
||||
echo "=> Starting Prometheus"
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
if [[ ! -f /app/data/prometheus_variables.sh ]]; then
|
||||
echo "=> Copy default prometheus variable file since it does not exist"
|
||||
cp /app/pkg/default_prometheus_variables.sh /app/data/prometheus_variables.sh
|
||||
fi
|
||||
|
||||
echo "=> Source custom variables"
|
||||
source /app/data/prometheus_variables.sh
|
||||
|
||||
echo "=> Starting Prometheus with retention time of $retention_time"
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime --storage.tsdb.retention.time="${retention_time:-15d}"
|
||||
|
|
2369
test/package-lock.json
generated
Normal file
2369
test/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
19
test/package.json
Normal file
19
test/package.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "test.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^10.2.0",
|
||||
"selenium-webdriver": "^4.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"chromedriver": "^108.0.0"
|
||||
}
|
||||
}
|
113
test/test.js
Executable file
113
test/test.js
Executable file
|
@ -0,0 +1,113 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/* jshint esversion: 8 */
|
||||
/* global describe */
|
||||
/* global before */
|
||||
/* global after */
|
||||
/* global it */
|
||||
|
||||
'use strict';
|
||||
|
||||
require('chromedriver');
|
||||
|
||||
var execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
path = require('path'),
|
||||
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
||||
{ Options } = require('selenium-webdriver/chrome');
|
||||
|
||||
if (!process.env.USERNAME || !process.env.PASSWORD) {
|
||||
console.log('USERNAME and PASSWORD env vars need to be set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
const LOCATION = 'test';
|
||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
const TEST_TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 50000;
|
||||
|
||||
var browser;
|
||||
var username = process.env.USERNAME;
|
||||
var password = process.env.PASSWORD;
|
||||
|
||||
var app;
|
||||
|
||||
before(function () {
|
||||
const options = new Options().windowSize({ width: 1280, height: 1024 });
|
||||
if (process.env.HEADLESS) options.addArguments('headless');
|
||||
|
||||
browser = new Builder().forBrowser('chrome').setChromeOptions(options).build();
|
||||
});
|
||||
|
||||
after(function () {
|
||||
browser.quit();
|
||||
});
|
||||
|
||||
async function waitForElement(elem) {
|
||||
await browser.wait(until.elementLocated(elem), TEST_TIMEOUT);
|
||||
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
function getAppInfo() {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
}
|
||||
|
||||
async function login() {
|
||||
await browser.get(`https://${app.fqdn}/login`);
|
||||
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
||||
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
||||
await browser.findElement(By.id('login')).click();
|
||||
await waitForElement(By.xpath('//a[text()="Alerts"]'));
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
await browser.get(`https://${app.fqdn}/logout`);
|
||||
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||
}
|
||||
|
||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||
it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); });
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
it('can login', login);
|
||||
it('can logout', logout);
|
||||
|
||||
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`, EXEC_ARGS); });
|
||||
it('can login', login);
|
||||
it('can logout', logout);
|
||||
|
||||
it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
||||
it('restore app', function () {
|
||||
const backups = JSON.parse(execSync(`cloudron backup list --raw --app ${app.id}`));
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
|
||||
getAppInfo();
|
||||
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
||||
});
|
||||
|
||||
it('can login', login);
|
||||
it('can logout', logout);
|
||||
|
||||
it('move to different location', function () { execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS); });
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
it('can login', login);
|
||||
it('can logout', logout);
|
||||
|
||||
it('uninstall app', function () { execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS); });
|
||||
|
||||
// test update
|
||||
it('can install app', function () { execSync(`cloudron install --appstore-id io.prometheus.cloudronapp --location ${LOCATION}`, EXEC_ARGS); });
|
||||
it('can get app information', getAppInfo);
|
||||
it('can update', function () { execSync(`cloudron update --app ${app.id}`, EXEC_ARGS); });
|
||||
it('can login', login);
|
||||
it('can logout', logout);
|
||||
it('uninstall app', function () { execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS); });
|
||||
});
|
||||
|
Loading…
Reference in a new issue