SHA256
1
0
forked from pool/telegraf
telegraf/telegraf.spec
Jeff Kowalczyk e525925a2b Accepting request 883694 from home:jfkw:branches:devel:languages:go
- Update to version 1.18.1:
  * Add ability to handle 'binary logs' mySQL query with 3 columns, in case 3 columns are sent (MySQL 8 and greater) (#9082)
  * Add configurable option for the 'path' tag override in the Tail plugin. (#9069)
  * fix nfsclient merge to release-1.18 branch
  * inputs.nfsclient: use uint64, also update error handling (#9067)
  * Fix inputs.snmp init when no mibs installed (#9050)
  * inputs.ping: Always SetPrivileged(true) in native mode (#9072)
  * Don't walk the entire interface table to just retrieve one field (#9043)
  * readme fix (#9064)
  * use correct compute metadata url to get folder-id (#9056)
  * Handle error when initializing the auth object in Azure Monitor output plugin. (#9048)
  * update: inputs.sqlserver support version in readme (#9040)
  * SQLServer - Fixes sqlserver_process_cpu calculation (#8549)
  * Fix ipmi panic (#9035)
  * check for length of perusage for stat gathering and removed not used function (#9009)
  * update new plugins in changelog (#8991)
  * exec plugins should not truncate messages in debug mode (#8333)
  * Close running outputs when reloading (#8769)

OBS-URL: https://build.opensuse.org/request/show/883694
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/telegraf?expand=0&rev=30
2021-04-07 21:51:56 +00:00

89 lines
2.5 KiB
RPMSpec

#
# spec file for package telegraf
#
# Copyright (c) 2021 SUSE LLC
#
# 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/
#
%define _config_dir %{_sysconfdir}/%{name}
Name: telegraf
Version: 1.18.1
Release: 0
Summary: The plugin-driven server agent for collecting & reporting metrics
License: MIT
Group: System/Monitoring
URL: https://github.com/influxdata/telegraf
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: git-core
BuildRequires: golang-packaging
BuildRequires: systemd-rpm-macros
BuildRequires: golang(API) >= 1.13
%{?systemd_ordering}
%description
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can
easily add support for collecting metrics from local or remote services.
%prep
%setup -q
%setup -q -T -D -a 1
%build
# Build the binary.
go build \
-mod=vendor \
%ifnarch ppc64 ppc64le
-buildmode=pie \
%endif
./cmd/telegraf;
%install
# Install the binary.
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
mkdir -p %{buildroot}/%{_config_dir}
mkdir -p %{buildroot}/%{_config_dir}/%{name}.d
install -m644 etc/%{name}.conf %{buildroot}/%{_config_dir}
install -D -m 644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
sed -i '/User=/d' %{buildroot}%{_unitdir}/%{name}.service
mkdir -p %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%{_sbindir}/rc%{name}
%{_unitdir}/%{name}.service
%doc CHANGELOG.md CONTRIBUTING.md README.md
%license LICENSE
%dir %{_config_dir}
%config(noreplace) %{_config_dir}/%{name}.conf
%{_bindir}/%{name}
%changelog