SHA256
1
0
forked from pool/telegraf

Accepting request 575781 from home:mschnitzer

initialize package

OBS-URL: https://build.opensuse.org/request/show/575781
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/telegraf?expand=0&rev=1
This commit is contained in:
Jordi Massaguer 2018-02-12 13:24:13 +00:00 committed by Git OBS Bridge
commit db022d8ce7
7 changed files with 202 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,69 @@
Index: telegraf-1.5.2/plugins/inputs/amqp_consumer/amqp_consumer.go
===================================================================
--- telegraf-1.5.2/plugins/inputs/amqp_consumer/amqp_consumer.go.original 2018-02-12 11:44:32.583888582 +0100
+++ telegraf-1.5.2/plugins/inputs/amqp_consumer/amqp_consumer.go 2018-02-12 11:53:42.111013874 +0100
@@ -20,6 +20,7 @@
URL string
// AMQP exchange
Exchange string
+ ExchangePassive bool
// Queue Name
Queue string
// Binding Key
@@ -65,6 +66,7 @@
url = "amqp://localhost:5672/influxdb"
## AMQP exchange
exchange = "telegraf"
+ exchange_passive = false
## AMQP queue name
queue = "telegraf"
## Binding Key
@@ -180,15 +182,27 @@
return nil, fmt.Errorf("Failed to open a channel: %s", err)
}
- err = ch.ExchangeDeclare(
- a.Exchange, // name
- "topic", // type
- true, // durable
- false, // auto-deleted
- false, // internal
- false, // no-wait
- nil, // arguments
- )
+ if a.ExchangePassive == true {
+ err = ch.ExchangeDeclarePassive(
+ a.Exchange, // name
+ "topic", // type
+ true, // durable
+ false, // auto-deleted
+ false, // internal
+ false, // no-wait
+ nil, // arguments
+ )
+ } else {
+ err = ch.ExchangeDeclare(
+ a.Exchange, // name
+ "topic", // type
+ true, // durable
+ false, // auto-deleted
+ false, // internal
+ false, // no-wait
+ nil, // arguments
+ )
+ }
if err != nil {
return nil, fmt.Errorf("Failed to declare an exchange: %s", err)
}
Index: telegraf-1.5.2/etc/telegraf.conf
===================================================================
--- telegraf-1.5.2/etc/telegraf.conf.original 2018-02-12 14:06:03.304072548 +0100
+++ telegraf-1.5.2/etc/telegraf.conf 2018-02-12 14:06:27.544041814 +0100
@@ -2747,6 +2747,7 @@
# url = "amqp://localhost:5672/influxdb"
# ## AMQP exchange
# exchange = "telegraf"
+# exchange_passive = false
# ## AMQP queue name
# queue = "telegraf"
# ## Binding Key

3
telegraf-1.5.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8245ad4a8a7ed1453e674017fb7017dbff151a83482f79e82542379dbc1124a5
size 910942

3
telegraf-deps.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42ff3e8df62a20fc2b2c27da0186fd1767d42d93bb8869c705dd314de6fc279b
size 34194837

28
telegraf.changes Normal file
View File

@ -0,0 +1,28 @@
-------------------------------------------------------------------
Mon Feb 12 11:27:05 UTC 2018 - mschnitzer@suse.com
- Add passive_amqp_exchange.patch:
* This patch allows to enable the exchange passive mode for the
AMQP consumer plugin. This is required for RabbitMQ servers
that rely on that (like the openSUSE ones)
* Upstream pull request is not possible because it requires you
to sign a CLA, but it's requested here:
https://github.com/influxdata/telegraf/issues/3785
-------------------------------------------------------------------
Thu Feb 8 07:31:00 UTC 2018 - mschnitzer@suse.com
- Release 1.5.2
* Bugfixes
#3684: Ignore empty lines in Graphite plaintext.
#3604: Fix index out of bounds error in solr input plugin.
#3680: Reconnect before sending graphite metrics if disconnected.
#3693: Align aggregator period with internal ticker to avoid skipping metrics.
#3629: Fix a potential deadlock when using aggregators.
#3697: Limit wait time for writes in mqtt output.
#3698: Revert change in graphite output where dot in field key was replaced by underscore.
#3710: Add timeout to wavefront output write.
#3725: Exclude master_replid fields from redis input.

75
telegraf.spec Normal file
View File

@ -0,0 +1,75 @@
#
# spec file for package telegraf
#
# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: telegraf
Version: 1.5.2
Release: 0
License: MIT
Summary: The plugin-driven server agent for collecting & reporting metrics
Url: https://github.com/influxdata/telegraf
Group: System/Monitoring
Source: %{name}-%{version}.tar.gz
Source1: %{name}-deps.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: go >= 1.7
BuildRequires: golang-packaging
## Features ##
## upstream request: https://github.com/influxdata/telegraf/issues/3785
Patch0: feature_passive_amqp_exchange.patch
## /Features ##
%define _telegraf_dir %{_builddir}/src/github.com/influxdata/%{name}
%define _config_dir %{_sysconfdir}/%{name}
%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
tar xfvz ../SOURCES/%{name}-%{version}.tar.gz
%patch0
mkdir -p %{_telegraf_dir}
mv %{name}-%{version}/* %{_telegraf_dir}
tar -C %{_builddir}/src -xjvf %{SOURCE1}
%build
export GOPATH="%{_builddir}:$GOPATH"
cd %{_telegraf_dir}
make %{name}
%install
mkdir -p %{buildroot}%{_bindir}
install -m755 %{_telegraf_dir}/%{name} %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}/%{_config_dir}
install -m644 %{_telegraf_dir}/etc/%{name}.conf %{buildroot}/%{_config_dir}
%files
%doc src/github.com/influxdata/%{name}/CHANGELOG.md
%doc src/github.com/influxdata/%{name}/CONTRIBUTING.md
%license src/github.com/influxdata/%{name}/LICENSE
%doc src/github.com/influxdata/%{name}/README.md
%dir %{_config_dir}
%config %{_config_dir}/%{name}.conf
%{_bindir}/%{name}
%changelog