forked from pool/golang-github-prometheus-prometheus
cb6536eb0e
- readded _service file removed in error. - Update to 2.11.1 + Bug Fix: * Fix potential panic when prometheus is watching multiple zookeeper paths. - Update to 2.11.0 + Bug Fix: * resolve race condition in maxGauge. * Fix ZooKeeper connection leak. * Improved atomicity of .tmp block replacement during compaction for usual case. * Fix "unknown series references" after clean shutdown. * Re-calculate block size when calling block.Delete. * Fix unsafe snapshots with head block. * prometheus_tsdb_compactions_failed_total is now incremented on any compaction failure. + Changes: * Remove max_retries from queue_config (it has been unused since rewriting remote-write to utilize the write-ahead-log) * The meta file BlockStats no longer holds size information. This is now dynamically calculated and kept in memory. It also includes the meta file size which was not included before * Renamed metric from prometheus_tsdb_wal_reader_corruption_errors to prometheus_tsdb_wal_reader_corruption_errors_total + Features: * Add option to use Alertmanager API v2. * Added humanizePercentage function for templates. * Include InitContainers in Kubernetes Service Discovery. * Provide option to compress WAL records using Snappy. + Enhancements: * Create new clean segment when starting the WAL. * Reduce allocations in PromQL aggregations. * Add storage warnings to LabelValues and LabelNames API results. * Add prometheus_http_requests_total metric. * Enable openbsd/arm build. * Remote-write allocation improvements. * Query performance improvement: Efficient iteration and search in HashForLabels and HashWithoutLabels. * Allow injection of arbitrary headers in promtool. * Allow passing external_labels in alert unit tests groups. * Allows globs for rules when unit testing. * Improved postings intersection matching. * Reduced disk usage for WAL for small setups. * Optimize queries using regexp for set lookups. OBS-URL: https://build.opensuse.org/request/show/716729 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=13
119 lines
4.3 KiB
RPMSpec
119 lines
4.3 KiB
RPMSpec
#
|
|
# spec file for package golang-github-prometheus-prometheus
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{go_nostrip}
|
|
|
|
Name: golang-github-prometheus-prometheus
|
|
Version: 2.11.1
|
|
Release: 0
|
|
Summary: The Prometheus monitoring system and time series database
|
|
License: Apache-2.0
|
|
Group: System/Management
|
|
Url: https://prometheus.io/
|
|
Source: prometheus-%{version}.tar.xz
|
|
Source1: prometheus.service
|
|
Source2: prometheus.yml
|
|
Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch
|
|
# Lifted from Debian's prometheus package
|
|
Patch2: 0002-Default-settings.patch
|
|
%ifarch aarch64
|
|
# For some reason the aarch64 build fails with:
|
|
# + promu build
|
|
# > prometheus
|
|
# # github.com/prometheus/prometheus/cmd/prometheus
|
|
# /usr/lib64/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
|
|
# /usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../aarch64-suse-linux/bin/ld: cannot find -lpthread
|
|
# /usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../aarch64-suse-linux/bin/ld: cannot find -lc
|
|
# collect2: error: ld returned 1 exit status
|
|
# Adding glibc-devel-static fixes it, but it's odd that this isn't
|
|
# also a problem on x86_64.
|
|
BuildRequires: glibc-devel-static
|
|
%endif
|
|
BuildRequires: fdupes
|
|
BuildRequires: golang-github-prometheus-promu
|
|
BuildRequires: golang-packaging
|
|
BuildRequires: xz
|
|
BuildRequires: golang(API) >= 1.12
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{?systemd_requires}
|
|
Requires(pre): shadow
|
|
%{go_provides}
|
|
|
|
%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 -n prometheus-%{version}
|
|
%patch1 -p 1
|
|
%patch2 -p 1
|
|
|
|
%build
|
|
%goprep github.com/prometheus/prometheus
|
|
GOPATH=%{_builddir}/go promu build
|
|
|
|
%install
|
|
%goinstall
|
|
install -D -m0755 %{_builddir}/prometheus-%{version}/prometheus %{buildroot}/%{_bindir}/prometheus
|
|
install -D -m0755 %{_builddir}/prometheus-%{version}/promtool %{buildroot}/%{_bindir}/promtool
|
|
%gosrc
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus.service
|
|
install -Dd -m 0755 %{buildroot}%{_sbindir}
|
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
|
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
|
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
|
%gofilelist
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
%pre
|
|
%service_add_pre prometheus.service
|
|
getent group prometheus >/dev/null || %{_sbindir}/groupadd -r prometheus
|
|
getent passwd prometheus >/dev/null || %{_sbindir}/useradd -r -g prometheus -d %{_localstatedir}/lib/prometheus -s /sbin/nologin prometheus
|
|
|
|
%post
|
|
%service_add_post prometheus.service
|
|
|
|
%preun
|
|
%service_del_preun prometheus.service
|
|
|
|
%postun
|
|
%service_del_postun prometheus.service
|
|
|
|
%files -f file.lst
|
|
%defattr(-,root,root,-)
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{_bindir}/prometheus
|
|
%{_bindir}/promtool
|
|
%{_unitdir}/prometheus.service
|
|
%{_sbindir}/rcprometheus
|
|
%dir %attr(0750, prometheus, prometheus) %{_localstatedir}/lib/prometheus
|
|
%dir %attr(0750, prometheus, prometheus) %{_localstatedir}/lib/prometheus/metrics
|
|
%dir %{_sysconfdir}/prometheus
|
|
%config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
|
|
|
|
%changelog
|