Accepting request 1224502 from home:ojkastl_buildservice:Branch_server_monitoring
update to 2.55.1 OBS-URL: https://build.opensuse.org/request/show/1224502 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=113
This commit is contained in:
commit
00a7f19859
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
38
0001-Do-not-force-the-pure-Go-name-resolver.patch
Normal file
38
0001-Do-not-force-the-pure-Go-name-resolver.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 1c355d58cf9c1d9d6aba110a61cea4a56c9c03a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Fajerski <jfajerski@suse.com>
|
||||||
|
Date: Fri, 8 Feb 2019 09:17:06 +0100
|
||||||
|
Subject: [PATCH] Do not force the pure Go name resolver
|
||||||
|
|
||||||
|
Revert to Go's default mechanism that will decide between the `netgo`
|
||||||
|
pure-Go implementation and the `netcgo` cgo-based implementation depending
|
||||||
|
on OS and environment variables.
|
||||||
|
|
||||||
|
This allows, among other things, to use Prometheus to scrape mDNS targets.
|
||||||
|
|
||||||
|
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
|
||||||
|
Signed-off-by: Johannes Kastl <git@johannes-kastl.de>
|
||||||
|
---
|
||||||
|
.promu.yml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/.promu.yml b/.promu.yml
|
||||||
|
index 699a7fa58..bbf32c87a 100644
|
||||||
|
--- a/.promu.yml
|
||||||
|
+++ b/.promu.yml
|
||||||
|
@@ -12,12 +12,12 @@ build:
|
||||||
|
path: ./cmd/promtool
|
||||||
|
tags:
|
||||||
|
all:
|
||||||
|
- - netgo
|
||||||
|
- builtinassets
|
||||||
|
- stringlabels
|
||||||
|
windows:
|
||||||
|
- builtinassets
|
||||||
|
- stringlabels
|
||||||
|
+ flags: -mod=vendor -a
|
||||||
|
ldflags: |
|
||||||
|
-X github.com/prometheus/common/version.Version={{.Version}}
|
||||||
|
-X github.com/prometheus/common/version.Revision={{.Revision}}
|
||||||
|
--
|
||||||
|
2.44.1
|
||||||
|
|
50
0002-Default-settings.patch
Normal file
50
0002-Default-settings.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 0c77e3c8a690decb726f92d363a8aadae6a1a0a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Fajerski <jfajerski@suse.com>
|
||||||
|
Date: Fri, 8 Feb 2019 09:28:12 +0100
|
||||||
|
Subject: [PATCH] Default settings
|
||||||
|
|
||||||
|
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
|
||||||
|
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
Signed-off-by: Johannes Kastl <git@johannes-kastl.de>
|
||||||
|
---
|
||||||
|
cmd/prometheus/main.go | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go
|
||||||
|
index b3bcb78b7..9a5a77a4d 100644
|
||||||
|
--- a/cmd/prometheus/main.go
|
||||||
|
+++ b/cmd/prometheus/main.go
|
||||||
|
@@ -300,7 +300,7 @@ func main() {
|
||||||
|
a.HelpFlag.Short('h')
|
||||||
|
|
||||||
|
a.Flag("config.file", "Prometheus configuration file path.").
|
||||||
|
- Default("prometheus.yml").StringVar(&cfg.configFile)
|
||||||
|
+ Default("/etc/prometheus/prometheus.yml").StringVar(&cfg.configFile)
|
||||||
|
|
||||||
|
a.Flag("web.listen-address", "Address to listen on for UI, API, and telemetry. Can be repeated.").
|
||||||
|
Default("0.0.0.0:9090").StringsVar(&cfg.web.ListenAddresses)
|
||||||
|
@@ -347,10 +347,10 @@ func main() {
|
||||||
|
Default(supportedRemoteWriteProtoMsgs.Strings()...).SetValue(rwProtoMsgFlagValue(&cfg.web.AcceptRemoteWriteProtoMsgs))
|
||||||
|
|
||||||
|
a.Flag("web.console.templates", "Path to the console template directory, available at /consoles.").
|
||||||
|
- Default("consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
|
||||||
|
+ Default("/etc/prometheus/consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
|
||||||
|
|
||||||
|
a.Flag("web.console.libraries", "Path to the console library directory.").
|
||||||
|
- Default("console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
|
||||||
|
+ Default("/etc/prometheus/console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
|
||||||
|
|
||||||
|
a.Flag("web.page-title", "Document title of Prometheus instance.").
|
||||||
|
Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
|
||||||
|
@@ -359,7 +359,7 @@ func main() {
|
||||||
|
Default(".*").StringVar(&cfg.corsRegexString)
|
||||||
|
|
||||||
|
serverOnlyFlag(a, "storage.tsdb.path", "Base path for metrics storage.").
|
||||||
|
- Default("data/").StringVar(&cfg.serverStoragePath)
|
||||||
|
+ Default("/var/lib/prometheus/metrics/").StringVar(&cfg.serverStoragePath)
|
||||||
|
|
||||||
|
serverOnlyFlag(a, "storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted. For use in testing.").
|
||||||
|
Hidden().Default("2h").SetValue(&cfg.tsdb.MinBlockDuration)
|
||||||
|
--
|
||||||
|
2.44.1
|
||||||
|
|
61
0003-Bump-go-retryablehttp.patch
Normal file
61
0003-Bump-go-retryablehttp.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From 4d25a94faa74e0a16e4bb7874c1d82faaf911d85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Mellado <dmellado@redhat.com>
|
||||||
|
Date: Tue, 25 Jun 2024 16:31:03 +0200
|
||||||
|
Subject: [PATCH] Bump go-retryablehttp to fix basic auth creds leak
|
||||||
|
|
||||||
|
This PR updates go-retryablehttp to version 0.7.7, even if it's used as
|
||||||
|
an indirect import. Versions previous to that can didn't sanitize urls,
|
||||||
|
discussed at HDCSEC-2024-12 [1]
|
||||||
|
|
||||||
|
[1] https://discuss.hashicorp.com/t/hcsec-2024-12-go-retryablehttp-can-leak-basic-auth-credentials-to-log-files/68027
|
||||||
|
|
||||||
|
Signed-off-by: Daniel Mellado <dmellado@redhat.com>
|
||||||
|
---
|
||||||
|
go.mod | 4 ++--
|
||||||
|
go.sum | 9 ++++-----
|
||||||
|
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/go.mod b/go.mod
|
||||||
|
index ac8b4f469d0..ce2f0714a0a 100644
|
||||||
|
--- a/go.mod
|
||||||
|
+++ b/go.mod
|
||||||
|
@@ -146,10 +146,10 @@ require (
|
||||||
|
github.com/hashicorp/cronexpr v1.1.2 // indirect
|
||||||
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||||
|
- github.com/hashicorp/go-hclog v1.5.0 // indirect
|
||||||
|
+ github.com/hashicorp/go-hclog v1.6.3 // indirect
|
||||||
|
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
|
- github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
|
||||||
|
+ github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||||
|
github.com/hashicorp/golang-lru v0.6.0 // indirect
|
||||||
|
github.com/hashicorp/serf v0.10.1 // indirect
|
||||||
|
diff --git a/go.sum b/go.sum
|
||||||
|
index 06db002f55b..956b9d89492 100644
|
||||||
|
--- a/go.sum
|
||||||
|
+++ b/go.sum
|
||||||
|
@@ -369,9 +369,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||||
|
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||||
|
-github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||||
|
-github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
|
||||||
|
-github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||||
|
+github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||||
|
+github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||||
|
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||||
|
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
|
||||||
|
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||||
|
@@ -383,8 +382,8 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||||
|
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||||
|
-github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA=
|
||||||
|
-github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
|
||||||
|
+github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
|
||||||
|
+github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
|
||||||
|
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
30
Makefile
Normal file
30
Makefile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
NAME = prometheus
|
||||||
|
SPEC = golang-github-prometheus-prometheus.spec
|
||||||
|
|
||||||
|
default: clean tar
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf prometheus $(NAME)-*.tar $(NAME)-*.tar.gz web-ui-*.tar.gz npm_licenses.tar.bz2 vendor.tar.gz
|
||||||
|
|
||||||
|
tar:
|
||||||
|
osc service manualrun
|
||||||
|
@version=$$( awk '/^Version:/ {print $$2;exit;}' $(SPEC) ) && \
|
||||||
|
echo "Package version is $$version" && \
|
||||||
|
basename=$(NAME)-$$version && \
|
||||||
|
tar=$$basename.tar && \
|
||||||
|
web_ui=web-ui-$$version.tar && \
|
||||||
|
wd=$$(pwd) && \
|
||||||
|
tmpdir=$$(mktemp -d -p /tmp) && \
|
||||||
|
cd $$tmpdir && \
|
||||||
|
tar -zxf $$wd/$$tar.gz && \
|
||||||
|
cd $$basename && \
|
||||||
|
make assets npm_licenses assets-compress && \
|
||||||
|
tar -cf $$wd/$$web_ui web/ui/static/react && \
|
||||||
|
find web/ui/static -type f -name '*.gz' -exec tar -rf $$wd/$$web_ui "{}" \; && \
|
||||||
|
tar -rf $$wd/$$web_ui web/ui/embed.go && \
|
||||||
|
cd .. && \
|
||||||
|
echo "Creating web assets tarball" && \
|
||||||
|
mv $$basename/npm_licenses.tar.bz2 $$wd && \
|
||||||
|
cd $$wd && \
|
||||||
|
gzip -f $$web_ui && \
|
||||||
|
rm -rf $$tmpdir
|
15
PACKAGING_README.md
Normal file
15
PACKAGING_README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Packaging prometheus
|
||||||
|
|
||||||
|
In addition to the source code in the tarball, this package also
|
||||||
|
needs the assets for the web UI. These can be generated by the
|
||||||
|
`Makefile` that is present in this package.
|
||||||
|
To do that, you need to have `make` and `npm` installed locally.
|
||||||
|
|
||||||
|
1. Change the version in the `_service` file
|
||||||
|
2. Change the version in the spec file
|
||||||
|
3. Run `make`
|
||||||
|
4. Create a changelog entry
|
||||||
|
5. Commit the changes as usual
|
||||||
|
|
||||||
|
For the OBS workflow you also need `obs-service-go_modules` as well
|
||||||
|
as `obs-service-tar_scm` and `obs-service-recompress`.
|
18
_service
Normal file
18
_service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="manual">
|
||||||
|
<param name="url">https://github.com/prometheus/prometheus.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="exclude">.git</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="revision">v2.55.1</param>
|
||||||
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
|
<param name="match-tag">v2*</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="manual">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">gz</param>
|
||||||
|
</service>
|
||||||
|
<service name="go_modules" mode="manual">
|
||||||
|
<param name="archive">prometheus-2.55.1.tar.gz</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
2382
golang-github-prometheus-prometheus.changes
Normal file
2382
golang-github-prometheus-prometheus.changes
Normal file
File diff suppressed because it is too large
Load Diff
176
golang-github-prometheus-prometheus.spec
Normal file
176
golang-github-prometheus-prometheus.spec
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
#
|
||||||
|
# spec file for package golang-github-prometheus-prometheus
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
# Copyright (c) 2017 Silvio Moioli <moio@suse.com>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Compatibility with systems older than Nov 2017
|
||||||
|
# See https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||||
|
%if ! %{defined _fillupdir}
|
||||||
|
%define _fillupdir /var/adm/fillup-templates
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} < 1500
|
||||||
|
%define _sharedstatedir /var/lib
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: golang-github-prometheus-prometheus
|
||||||
|
Version: 2.55.1
|
||||||
|
Release: 0
|
||||||
|
Summary: The Prometheus monitoring system and time series database
|
||||||
|
License: Apache-2.0
|
||||||
|
Group: System/Monitoring
|
||||||
|
URL: https://prometheus.io/
|
||||||
|
# also includes web assets generated with `make assets`
|
||||||
|
Source: prometheus-%{version}.tar.gz
|
||||||
|
Source1: vendor.tar.gz
|
||||||
|
Source2: web-ui-%{version}.tar.gz
|
||||||
|
Source3: prometheus.service
|
||||||
|
Source4: prometheus.yml
|
||||||
|
Source5: prometheus.sysconfig
|
||||||
|
Source6: prometheus.firewall.xml
|
||||||
|
Source7: npm_licenses.tar.bz2
|
||||||
|
Source8: Makefile
|
||||||
|
Source9: PACKAGING_README.md
|
||||||
|
Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch
|
||||||
|
# Lifted from Debian's prometheus package
|
||||||
|
Patch2: 0002-Default-settings.patch
|
||||||
|
BuildRequires: fdupes
|
||||||
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
||||||
|
BuildRequires: firewall-macros
|
||||||
|
%endif
|
||||||
|
# Adding glibc-devel-static seems to be required for linking if building
|
||||||
|
# with -buildmode=pie
|
||||||
|
BuildRequires: glibc-devel-static
|
||||||
|
BuildRequires: golang-github-prometheus-promu >= 0.14.0
|
||||||
|
BuildRequires: golang-packaging
|
||||||
|
BuildRequires: golang(API) >= 1.21
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
|
Recommends: firewalld-prometheus-config
|
||||||
|
%endif
|
||||||
|
Requires(pre): user(prometheus)
|
||||||
|
Requires(pre): group(prometheus)
|
||||||
|
Requires(post): %fillup_prereq
|
||||||
|
Provides: prometheus = %{version}
|
||||||
|
ExcludeArch: s390
|
||||||
|
%systemd_ordering
|
||||||
|
|
||||||
|
%go_nostrip
|
||||||
|
|
||||||
|
%description
|
||||||
|
Prometheus's main features are:
|
||||||
|
- a multi-dimensional data model (time series identified by metric name and key/value pairs)
|
||||||
|
- a flexible query language to leverage this dimensionality
|
||||||
|
- no reliance on distributed storage; single server nodes are autonomous
|
||||||
|
- time series collection happens via a pull model over HTTP
|
||||||
|
- pushing time series is supported via an intermediary gateway
|
||||||
|
- targets are discovered via service discovery or static configuration
|
||||||
|
- multiple modes of graphing and dashboarding support
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -a1 -n prometheus-%{version}
|
||||||
|
%autosetup -D -a2 -p1 -n prometheus-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%goprep github.com/prometheus/prometheus
|
||||||
|
GOPATH=%{_builddir}/go promu build -v
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -D -m0755 %{_builddir}/prometheus-%{version}/prometheus %{buildroot}/%{_bindir}/prometheus
|
||||||
|
install -D -m0755 %{_builddir}/prometheus-%{version}/promtool %{buildroot}/%{_bindir}/promtool
|
||||||
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/prometheus.service
|
||||||
|
|
||||||
|
install -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
|
||||||
|
|
||||||
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
||||||
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus
|
||||||
|
|
||||||
|
install -m 0755 -d %{buildroot}%{_datarootdir}/prometheus
|
||||||
|
cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
|
||||||
|
|
||||||
|
install -m 0755 -d %{buildroot}%{_fillupdir}
|
||||||
|
install -m 0644 %{SOURCE5} %{buildroot}%{_fillupdir}/sysconfig.prometheus
|
||||||
|
|
||||||
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
||||||
|
install -m 0755 -d %{buildroot}%{_prefix}/lib/firewalld/services/
|
||||||
|
install -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/prometheus.xml
|
||||||
|
%endif
|
||||||
|
|
||||||
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
|
||||||
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data
|
||||||
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
||||||
|
|
||||||
|
install -D -m0644 %{SOURCE7} %{buildroot}/%{_defaultlicensedir}/%{name}/npm_licenses.tar.bz2
|
||||||
|
%gofilelist
|
||||||
|
|
||||||
|
%fdupes %{buildroot}/%{_prefix}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre prometheus.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%fillup_only -n prometheus
|
||||||
|
%service_add_post prometheus.service
|
||||||
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
||||||
|
%firewalld_reload
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun prometheus.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun prometheus.service
|
||||||
|
|
||||||
|
%verifyscript
|
||||||
|
%fillup_only -n prometheus
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE
|
||||||
|
%license %{_defaultlicensedir}/%{name}
|
||||||
|
%{_bindir}/prometheus
|
||||||
|
%{_bindir}/promtool
|
||||||
|
%{_unitdir}/prometheus.service
|
||||||
|
%{_sbindir}/rcprometheus
|
||||||
|
%{_datarootdir}/prometheus
|
||||||
|
%{_fillupdir}/sysconfig.prometheus
|
||||||
|
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus
|
||||||
|
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus/data
|
||||||
|
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus/metrics
|
||||||
|
%dir %{_sysconfdir}/prometheus
|
||||||
|
%config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
|
||||||
|
|
||||||
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
||||||
|
%package -n firewalld-prometheus-config
|
||||||
|
Summary: Firewalld configuration file for Prometheus
|
||||||
|
Group: Productivity/Networking/Security
|
||||||
|
Version: 0.1
|
||||||
|
Release: 0
|
||||||
|
License: GPL-2.0-or-later
|
||||||
|
Requires: firewalld
|
||||||
|
|
||||||
|
%description -n firewalld-prometheus-config
|
||||||
|
This package contains configuration file for Prometheus for older versions of
|
||||||
|
Firewalld which do not provide this in own package.
|
||||||
|
|
||||||
|
%files -n firewalld-prometheus-config
|
||||||
|
%dir %{_prefix}/lib/firewalld
|
||||||
|
%dir %{_prefix}/lib/firewalld/services
|
||||||
|
%{_prefix}/lib/firewalld/services/prometheus.xml
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
3
npm_licenses.tar.bz2
Normal file
3
npm_licenses.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3bf63c3eba167750f7fdb27f227370fd5df91394c972ed566f56f778735208e2
|
||||||
|
size 168005
|
3
prometheus-2.53.0.tar.gz
Normal file
3
prometheus-2.53.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2cf137bb8057c8634a5c25ac4b3717dfc9cbc6b81f3f0e5e6894dab797f256d7
|
||||||
|
size 6317918
|
3
prometheus-2.54.0.tar.gz
Normal file
3
prometheus-2.54.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3425b96304551b524854f9d08d4dbaa70df3e04343b772373040b7217c81b2c7
|
||||||
|
size 6411184
|
3
prometheus-2.54.1.tar.gz
Normal file
3
prometheus-2.54.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e761aade301520adcfc57d5ec2c8d5c6ed53b1cbe7d91a8594393f7e8ad5caf4
|
||||||
|
size 6411851
|
3
prometheus-2.55.0.tar.gz
Normal file
3
prometheus-2.55.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:08aede677137e1539a8b7bedf8841a7a8dd648550965f8377b5b9277d5b73768
|
||||||
|
size 6482244
|
3
prometheus-2.55.1.tar.gz
Normal file
3
prometheus-2.55.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e38829677b422fa39716e6c8d6d0e3976f83968fa0ed62668f55957f9df805ed
|
||||||
|
size 6481896
|
6
prometheus.firewall.xml
Normal file
6
prometheus.firewall.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<service>
|
||||||
|
<short>Prometheus</short>
|
||||||
|
<description>Prometheus monitoring system and time series database.</description>
|
||||||
|
<port protocol="tcp" port="9090"/>
|
||||||
|
</service>
|
30
prometheus.service
Normal file
30
prometheus.service
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Monitoring system and time series database
|
||||||
|
Documentation=https://prometheus.io/docs/introduction/overview/
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# added automatically, for details please see
|
||||||
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectClock=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
# end of automatic additions
|
||||||
|
Restart=always
|
||||||
|
User=prometheus
|
||||||
|
EnvironmentFile=-/etc/sysconfig/prometheus
|
||||||
|
ExecStart=/usr/bin/prometheus $ARGS
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
TimeoutStopSec=20s
|
||||||
|
SendSIGKILL=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
prometheus.sysconfig
Normal file
9
prometheus.sysconfig
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
## Path:
|
||||||
|
## Description: Prometheus monitoring server settings
|
||||||
|
## Type: string
|
||||||
|
## Default: ""
|
||||||
|
## ServiceRestart: prometheus
|
||||||
|
#
|
||||||
|
# Command line options for prometheus
|
||||||
|
#
|
||||||
|
ARGS=""
|
38
prometheus.yml
Normal file
38
prometheus.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Sample config for Prometheus.
|
||||||
|
|
||||||
|
global:
|
||||||
|
scrape_interval: 15s # By default, scrape targets every 15 seconds.
|
||||||
|
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
|
||||||
|
# scrape_timeout is set to the global default (10s).
|
||||||
|
|
||||||
|
# Attach these labels to any time series or alerts when communicating with
|
||||||
|
# external systems (federation, remote storage, Alertmanager).
|
||||||
|
external_labels:
|
||||||
|
monitor: 'example'
|
||||||
|
|
||||||
|
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||||
|
rule_files:
|
||||||
|
# - "first.rules"
|
||||||
|
# - "second.rules"
|
||||||
|
|
||||||
|
# A scrape configuration containing exactly one endpoint to scrape:
|
||||||
|
# Here it's Prometheus itself.
|
||||||
|
scrape_configs:
|
||||||
|
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
||||||
|
- job_name: 'prometheus'
|
||||||
|
|
||||||
|
# Override the global default and scrape targets from this job every 5 seconds.
|
||||||
|
scrape_interval: 5s
|
||||||
|
scrape_timeout: 5s
|
||||||
|
|
||||||
|
# metrics_path defaults to '/metrics'
|
||||||
|
# scheme defaults to 'http'.
|
||||||
|
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
|
- job_name: node
|
||||||
|
# If prometheus-node-exporter is installed, grab stats about the local
|
||||||
|
# machine by default.
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9100']
|
3
vendor.tar.gz
Normal file
3
vendor.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8dc140b0988f1f00c681fd2b91977f0caad83914ea975b6f9b4436492579ec83
|
||||||
|
size 15033006
|
3
web-ui-2.53.0.tar.gz
Normal file
3
web-ui-2.53.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7a6f8def612ce4658afe2b7a0c78b388d19348e749f42b64e8e237795fc3a20a
|
||||||
|
size 3603395
|
3
web-ui-2.54.0.tar.gz
Normal file
3
web-ui-2.54.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:986a7cd4b5ed99f051b5406e27b1e5d2262fcb3dfad2efa356a3ebaad3800351
|
||||||
|
size 3679048
|
3
web-ui-2.54.1.tar.gz
Normal file
3
web-ui-2.54.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8d9ab782a54f2bad2613c0661e28fc1a3f54856d45ca7c0ff8519cf5db15c595
|
||||||
|
size 3679107
|
3
web-ui-2.55.0.tar.gz
Normal file
3
web-ui-2.55.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:db06dd805202965b53a439761bb2dfe57f6264a4e1e604bcdbe615f3fca7ebbc
|
||||||
|
size 3680354
|
3
web-ui-2.55.1.tar.gz
Normal file
3
web-ui-2.55.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e329421232a317910a58842f2e1a87a58ac6ef0c62ff6e39514e3aca253ce46d
|
||||||
|
size 3680690
|
Loading…
Reference in New Issue
Block a user