Browse code

Upgrade telegraf and wavefront-proxy

Change-Id: Ieaf362a9e9796eb71c4c40526e6fd3db7173bf7c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5065
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

DheerajSShetty authored on 2018/04/24 02:46:57
Showing 3 changed files
... ...
@@ -29,7 +29,7 @@
29 29
   interval = "60s"
30 30
   ## Rounds collection interval to 'interval'
31 31
   ## ie, if interval="10s" then always collect on :00, :10, :20, etc.
32
-  round_interval = true
32
+  round_interval = false
33 33
 
34 34
   ## Telegraf will send metrics to outputs in batches of at
35 35
   ## most metric_batch_size metrics.
... ...
@@ -72,6 +72,43 @@
72 72
 #                            OUTPUT PLUGINS                                   #
73 73
 ###############################################################################
74 74
 
75
+ [[outputs.wavefront]]
76
+          ## DNS name of the wavefront proxy server
77
+          host = "localhost"
78
+
79
+          ## Port that the Wavefront proxy server listens on
80
+          port = 2878
81
+
82
+          ## prefix for metrics keys
83
+          #prefix = "my.specific.prefix."
84
+
85
+          ## wether to use "value" for name of simple fields. default is false
86
+          simple_fields = false
87
+
88
+          ## character to use between metric and field name. default is . (dot)
89
+          metric_separator = "."
90
+
91
+          ## Convert metric name paths to use metricSeperator character
92
+          ## When true will convert all _ (underscore) chartacters in final metric name. default is true
93
+          convert_paths = true
94
+
95
+          ## Use Regex to sanitize metric and tag names from invalid characters
96
+          ## Regex is more thorough, but significantly slower. default is false
97
+          use_regex = false
98
+
99
+          ## point tags to use as the source name for Wavefront (if none found, host will be used)
100
+          source_override = ["hostname", "snmp_host", "node_host"]
101
+
102
+          ## whether to convert boolean values to numeric values, with false -> 0.0 and true -> 1.0. default is true
103
+          convert_bool = true
104
+
105
+          ## Define a mapping, namespaced by metric prefix, from string values to numeric values
106
+          ## The example below maps "green" -> 1.0, "yellow" -> 0.5, "red" -> 0.0 for
107
+          ## any metrics beginning with "elasticsearch"
108
+          #[[outputs.wavefront.string_to_number.elasticsearch]]
109
+          #  green = 1.0
110
+          #  yellow = 0.5
111
+          #  red = 0.0
75 112
 
76 113
 
77 114
 ###############################################################################
... ...
@@ -1,14 +1,12 @@
1 1
 Summary:        agent for collecting, processing, aggregating, and writing metrics.
2 2
 Name:           telegraf
3
-Version:        1.3.4
4
-Release:        2%{?dist}
3
+Version:        1.5.3
4
+Release:        1%{?dist}
5 5
 License:        MIT
6 6
 URL:            https://github.com/influxdata/telegraf
7 7
 Source0:        https://github.com/influxdata/telegraf/archive/%{name}-%{version}.tar.gz
8
-%define sha1    telegraf=b9613ff3960ab791ec992426067b99c02b8797c7
9
-Source1:        https://github.com/wavefrontHQ/telegraf/archive/telegraf-plugin.zip
10
-%define sha1    telegraf-plugin=6cc53faee7ae4df01f7bc5c6dcd46d94a5db5ece 
11
-Source2:        https://raw.githubusercontent.com/wavefrontHQ/integrations/master/telegraf/telegraf.conf
8
+%define sha1    telegraf=ff9860f1491cedb965283e1ffd5bd6870c473f77
9
+Source1:        https://raw.githubusercontent.com/wavefrontHQ/integrations/master/telegraf/telegraf.conf
12 10
 Group:          Development/Tools
13 11
 Vendor:         VMware, Inc.
14 12
 Distribution:   Photon
... ...
@@ -16,6 +14,7 @@ BuildRequires:  go
16 16
 BuildRequires:  git
17 17
 BuildRequires:  systemd-devel
18 18
 BuildRequires:  unzip
19
+BuildRequires:  elfutils
19 20
 Requires:       systemd
20 21
 Requires:       logrotate
21 22
 Requires(pre):  /usr/sbin/useradd /usr/sbin/groupadd
... ...
@@ -30,37 +29,19 @@ Postgres, or Redis) and third party APIs (like Mailchimp, AWS CloudWatch, or Goo
30 30
 
31 31
 %prep
32 32
 %setup
33
-cat << EOF >>%{SOURCE2}
34
-[[outputs.wavefront]]
35
-host = "localhost"
36
-port = 2878
37
-metric_separator = "."
38
-source_override = ["hostname", "snmp_host", "node_host"]
39
-convert_paths = true
40
-use_regex = false
41
-EOF
42
-
43
-pushd ..
44
-unzip %{SOURCE1}
45
-popd
46 33
 
47 34
 %build
48 35
 mkdir -p ${GOPATH}/src/github.com/influxdata/telegraf
49 36
 cp -r * ${GOPATH}/src/github.com/influxdata/telegraf
50
-mkdir -p ${GOPATH}/src/github.com/wavefronthq/telegraf/plugins/outputs/wavefront
51
-pushd ../telegraf-master
52
-cp -r *  ${GOPATH}/src/github.com/wavefronthq/telegraf/
53
-popd
54 37
 pushd ${GOPATH}/src/github.com/influxdata/telegraf
55
-sed -i '/import (/ a \\t_ "github.com/wavefronthq/telegraf/plugins/outputs/wavefront"' ${GOPATH}/src/github.com/influxdata/telegraf/plugins/outputs/all/all.go
56 38
 make
57 39
 popd
58 40
 
59 41
 %install
60
-install -m 755 -D ${GOPATH}/bin/telegraf %{buildroot}%{_bindir}/telegraf
42
+install -m 755 -D ${GOPATH}/src/github.com/influxdata/telegraf/telegraf %{buildroot}%{_bindir}/telegraf
61 43
 install -m 755 -D ${GOPATH}/src/github.com/influxdata/telegraf/scripts/telegraf.service %{buildroot}%{_unitdir}/telegraf.service
62 44
 install -m 755 -D ${GOPATH}/src/github.com/influxdata/telegraf/etc/logrotate.d/%{name} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
63
-install -m 755 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/telegraf.conf
45
+install -m 755 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/telegraf.conf
64 46
 
65 47
 %clean
66 48
 rm -rf %{buildroot}/*
... ...
@@ -93,6 +74,8 @@ fi
93 93
 %config(noreplace) %{_sysconfdir}/%{name}/telegraf.conf
94 94
 
95 95
 %changelog
96
+*   Fri Apr 20 2018 Dheeraj Shetty <dheerajs@vmware.com> 1.5.3-1
97
+-   upgrade to 1.5.3
96 98
 *   Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 1.3.4-2
97 99
 -   Remove shadow from requires and use explicit tools for post actions
98 100
 *   Tue Jul 18 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.3.4-1
... ...
@@ -1,12 +1,11 @@
1 1
 Summary:        lightweight java application to send metrics to.
2 2
 Name:           wavefront-proxy
3
-Version:        4.16
4
-Release:        4%{?dist}
3
+Version:        4.26
4
+Release:        1%{?dist}
5 5
 License:        Apache 2.0
6 6
 URL:            https://github.com/wavefrontHQ/java
7 7
 Source0:        https://github.com/wavefrontHQ/java/archive/wavefront-%{version}.tar.gz 
8
-%define sha1    wavefront=ff6ff22118e69c9df8de1427aa67659ebeb3341f
9
-Patch0:         CVE-2017-9735.patch
8
+%define sha1    wavefront=07a1006c4c47dcda48b2cca8464075283f8f457d
10 9
 Group:          Development/Tools
11 10
 Vendor:         VMware, Inc.
12 11
 Distribution:   Photon
... ...
@@ -27,7 +26,6 @@ It handles authentication and the transmission of your metrics to your Wavefront
27 27
 
28 28
 %prep
29 29
 %setup -n java-wavefront-%{version} 
30
-%patch0 -p1
31 30
 
32 31
 cat << EOF >>wavefront-proxy.service
33 32
 [Unit]
... ...
@@ -106,6 +104,8 @@ rm -rf %{buildroot}/*
106 106
 %{_unitdir}/wavefront-proxy.service
107 107
 
108 108
 %changelog
109
+* Fri Apr 20 2018 Dheeraj Shetty <dheerajs@vmware.com> 4.26-1
110
+- upgrade to 4.26
109 111
 * Mon Oct 08 2017 Dheeraj Shetty <dheerajs@vmware.com> 4.16-4
110 112
 - Add Docker related files to the package
111 113
 * Tue Oct 03 2017 Dheeraj Shetty <dheerajs@vmware.com> 4.16-3