forked from pool/golang-github-prometheus-prometheus
3485edbd72
- rebase patch002-Default-settings.patch - Update to 2.10.0: + Bug Fixes: * TSDB: Don't panic when running out of disk space and recover nicely from the condition * TSDB: Correctly handle empty labels. * TSDB: Don't crash on an unknown tombstone reference. * Storage/remote: Remove queue-manager specific metrics if queue no longer exists. * PromQL: Correctly display {__name__="a"}. * Discovery/kubernetes: Use service rather than ingress as the name for the service workqueue. * Discovery/azure: Don't panic on a VM with a public IP. * Web: Fixed Content-Type for js and css instead of using /etc/mime.types. * API: Encode alert values as string to correctly represent Inf/NaN. + Features: * Template expansion: Make external labels available as $externalLabels in alert and console template expansion. * TSDB: Add prometheus_tsdb_wal_segment_current metric for the WAL segment index that TSDB is currently writing to. tsdb * Scrape: Add scrape_series_added per-scrape metric. #5546 + Enhancements * Discovery/kubernetes: Add labels __meta_kubernetes_endpoint_node_name and __meta_kubernetes_endpoint_hostname. * Discovery/azure: Add label __meta_azure_machine_public_ip. * TSDB: Simplify mergedPostings.Seek, resulting in better performance if there are many posting lists. tsdb * Log filesystem type on startup. * Cmd/promtool: Use POST requests for Query and QueryRange. client_golang * Web: Sort alerts by group name. * Console templates: Add convenience variables $rawParams, $params, $path. - Upadte to 2.9.2 + Bug Fixes: * Make sure subquery range is taken into account for selection * Exhaust every request body before closing it * Cmd/promtool: return errors from rule evaluations * Remote Storage: string interner should not panic in release * Fix memory allocation regression in mergedPostings.Seek tsdb - Update to 2.9.1 + Bug Fixes: * Discovery/kubernetes: fix missing label sanitization * Remote_write: Prevent reshard concurrent with calling stop - Update to 2.9.0 + Feature: * Add honor_timestamps scrape option. + Enhancements: * Update Consul to support catalog.ServiceMultipleTags. * Discovery/kubernetes: add present labels for labels/annotations. * OpenStack SD: Add ProjectID and UserID meta labels. * Add GODEBUG and retention to the runtime page. * Add support for POSTing to /series endpoint. * Support PUT methods for Lifecycle and Admin APIs. * Scrape: Add global jitter for HA server. * Check for cancellation on every step of a range evaluation. * String interning for labels & values in the remote_write path. * Don't lose the scrape cache on a failed scrape. * Reload cert files from disk automatically. common * Use fixed length millisecond timestamp format for logs. common * Performance improvements for postings. Bug Fixes: * Remote Write: fix checkpoint reading. * Check if label value is valid when unmarshaling external labels from YAML. * Promparse: sort all labels when parsing. * Reload rules: copy state on both name and labels. * Exponentation operator to drop metric name in result of operation. * Config: resolve more file paths. * Promtool: resolve relative paths in alert test files. * Set TLSHandshakeTimeout in HTTP transport. common * Use fsync to be more resilient to machine crashes. * Keep series that are still in WAL in checkpoints. - Update to 2.8.1 + Bug Fixes * Display the job labels in /targets which was removed accidentally - Update to 2.8.0 + Change: * This release uses Write-Ahead Logging (WAL) for the remote_write API. This currently causes a slight increase in memory usage, which will be addressed in future releases. * Default time retention is used only when no size based retention is specified. These are flags where time retention is specified by the flag --storage.tsdb.retention and size retention by --storage.tsdb.retention.size. * prometheus_tsdb_storage_blocks_bytes_total is now prometheus_tsdb_storage_blocks_bytes. + Feature: * (EXPERIMENTAL) Time overlapping blocks are now allowed; vertical compaction and vertical query merge. It is an optional feature which is controlled by the --storage.tsdb.allow-overlapping-blocks flag, disabled by default. + Enhancements: * Use the WAL for remote_write API. * Query performance improvements. * UI enhancements with upgrade to Bootstrap 4. * Reduce time that Alertmanagers are in flux when reloaded. * Limit number of metrics displayed on UI to 10000. * (1) Remember All/Unhealthy choice on target-overview when reloading page. (2) Resize text-input area on Graph page on mouseclick. * In histogram_quantile merge buckets with equivalent le values. * Show list of offending labels in the error message in many-to-many scenarios. * Show Storage Retention criteria in effect on /status page. + Bug Fixes: + Fix sorting of rule groups. + Fix support for password_file and bearer_token_file in Kubernetes SD. + Scrape: catch errors when creating HTTP clients + Adds new metrics: prometheus_target_scrape_pools_total prometheus_target_scrape_pools_failed_total prometheus_target_scrape_pool_reloads_total prometheus_target_scrape_pool_reloads_failed_total + Fix panic when aggregator param is not a literal. OBS-URL: https://build.opensuse.org/request/show/713709 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=12
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.10.0
|
|
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
|