Accepting request 1183869 from home:witekbedyk:branches:server:monitoring
- Bump go-retryablehttp to version 0.7.7 (CVE-2024-6104, bsc#1227038) - Add 0003-Bump-go-retryablehttp.patch OBS-URL: https://build.opensuse.org/request/show/1183869 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=103
This commit is contained in:
commit
730c0e077d
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 e9458dc825ca19e306b1ded6433c5d25a1237c71 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 e5e01181c..5fbce7825 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.43.0
|
||||
|
49
0002-Default-settings.patch
Normal file
49
0002-Default-settings.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 06585754d2707a31fd4ab86b9b1ce82f7d55e78c 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>
|
||||
---
|
||||
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 9f4c50071..f7ec14c5f 100644
|
||||
--- a/cmd/prometheus/main.go
|
||||
+++ b/cmd/prometheus/main.go
|
||||
@@ -226,7 +226,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.").
|
||||
Default("0.0.0.0:9090").StringVar(&cfg.web.ListenAddress)
|
||||
@@ -261,10 +261,10 @@ func main() {
|
||||
Default("false").BoolVar(&cfg.web.EnableRemoteWriteReceiver)
|
||||
|
||||
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)
|
||||
@@ -273,7 +273,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.39.0
|
||||
|
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.53.0</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.53.0.tar.gz</param>
|
||||
</service>
|
||||
</services>
|
2195
golang-github-prometheus-prometheus.changes
Normal file
2195
golang-github-prometheus-prometheus.changes
Normal file
File diff suppressed because it is too large
Load Diff
178
golang-github-prometheus-prometheus.spec
Normal file
178
golang-github-prometheus-prometheus.spec
Normal file
@ -0,0 +1,178 @@
|
||||
#
|
||||
# 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.53.0
|
||||
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
|
||||
# https://github.com/prometheus/prometheus/pull/14345 (CVE-2024-6104)
|
||||
Patch3: 0003-Bump-go-retryablehttp.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:4db00e4ca449d51771ac01b6e520832524c9af37a670da56ab2a3a267b023f08
|
||||
size 168478
|
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
|
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:e2b0c9f3ae8bc6f0bca709480472cc891f1537c218d4d4b9bbc9dbae2aefcf8f
|
||||
size 15117166
|
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
|
Loading…
Reference in New Issue
Block a user