forked from pool/telegraf
Accepting request 680377 from home:coolo:branches:openSUSE:Factory
- Enable PIE for build - Include systemd service file from upstream - Update to release 1.8.3 - Update deps package * v1.8.3 [2018-10-30] #4873: Add DN attributes as tags in x509_cert input to avoid series overwrite. #4921: Prevent connection leak by closing unused connections in amqp output. #4904: Use default partition key when tag does not exist in kinesis output. #4901: Log the correct error in jti_openconfig. #4937: Handle panic when ipmi_sensor input gets bad input. #4930: Don't add unserializable fields to jolokia2 input. #4866: Fix version check in postgresql_extensible. * v1.8.2 [2018-10-17] - Bugfixes #4844: Update write path to match updated InfluxDB v2 API. #4840: Fix missing timeouts in vsphere input. #4851: Support uint fields in aerospike input. #4854: Use container name from list if no name in container stats. #4850: Prevent panic in filecount input on error in file stat. #4846: Fix mqtt_consumer connect and reconnect. #4849: Fix panic in logparser input. #4869: Lower authorization errors to debug level in mongodb input. #4875: Return correct response code on ping input. #4874: Fix segfault in x509_cert input. * v1.8.1 [2018-10-03] - Bugfixes #4750: Fix hardware_type may be truncated in sqlserver input. #4723: Improve performance in basicstats aggregator. #4747: Add hostname to TLS config for SNI support. OBS-URL: https://build.opensuse.org/request/show/680377 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/telegraf?expand=0&rev=7
This commit is contained in:
parent
54f790609d
commit
27038d99b4
391
0001-Generic-SQL-output-plugin-for-Telegraf.patch
Normal file
391
0001-Generic-SQL-output-plugin-for-Telegraf.patch
Normal file
@ -0,0 +1,391 @@
|
||||
diff -urN telegraf-1.8.3/plugins/outputs/all/all.go telegraf-1.8.3-patch/plugins/outputs/all/all.go
|
||||
--- telegraf-1.8.3/plugins/outputs/all/all.go 2018-10-30 23:13:52.000000000 +0200
|
||||
+++ telegraf-1.8.3-patch/plugins/outputs/all/all.go 2018-11-01 10:00:53.949179483 +0200
|
||||
@@ -28,5 +28,6 @@
|
||||
_ "github.com/influxdata/telegraf/plugins/outputs/riemann"
|
||||
_ "github.com/influxdata/telegraf/plugins/outputs/riemann_legacy"
|
||||
_ "github.com/influxdata/telegraf/plugins/outputs/socket_writer"
|
||||
+ _ "github.com/influxdata/telegraf/plugins/outputs/sql"
|
||||
_ "github.com/influxdata/telegraf/plugins/outputs/wavefront"
|
||||
)
|
||||
diff -urN telegraf-1.8.3/plugins/outputs/sql/README.md telegraf-1.8.3-patch/plugins/outputs/sql/README.md
|
||||
--- telegraf-1.8.3/plugins/outputs/sql/README.md 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ telegraf-1.8.3-patch/plugins/outputs/sql/README.md 2018-11-01 09:59:15.296965030 +0200
|
||||
@@ -0,0 +1,73 @@
|
||||
+# SQL plugin
|
||||
+
|
||||
+The plugin inserts values to SQL various database.
|
||||
+Supported/integrated drivers are mssql (SQLServer), mysql (MySQL), postgres (Postgres)
|
||||
+Activable drivers (read below) are all golang SQL compliant drivers (see https://github.com/golang/go/wiki/SQLDrivers): for instance oci8 for Oracle or sqlite3 (SQLite)
|
||||
+
|
||||
+## Getting started :
|
||||
+First you need to grant insert (if auto create table create) privileges to the database user you use for the connection
|
||||
+
|
||||
+## Configuration:
|
||||
+
|
||||
+```
|
||||
+# Send metrics to SQL-Database (Example configuration for MySQL/MariaDB)
|
||||
+[[outputs.sql]]
|
||||
+ ## Database Driver, required.
|
||||
+ ## Valid options: mssql (SQLServer), mysql (MySQL), postgres (Postgres), sqlite3 (SQLite), [oci8 ora.v4 (Oracle)]
|
||||
+ driver = "mysql"
|
||||
+
|
||||
+ ## specify address via a url matching:
|
||||
+ ## postgres://[pqgotest[:password]]@localhost[/dbname]\
|
||||
+ ## ?sslmode=[disable|verify-ca|verify-full]
|
||||
+ ## or a simple string:
|
||||
+ ## host=localhost user=pqotest password=... sslmode=... dbname=app_production
|
||||
+ ##
|
||||
+ ## All connection parameters are optional.
|
||||
+ ##
|
||||
+ ## Without the dbname parameter, the driver will default to a database
|
||||
+ ## with the same name as the user. This dbname is just for instantiating a
|
||||
+ ## connection with the server and doesn't restrict the databases we are trying
|
||||
+ ## to grab metrics for.
|
||||
+ ##
|
||||
+ address = "username:password@tcp(server:port)/table"
|
||||
+
|
||||
+ ## Available Variables:
|
||||
+ ## {TABLE} - tablename as identifier
|
||||
+ ## {TABLELITERAL} - tablename as string literal
|
||||
+ ## {COLUMNS} - column definitions
|
||||
+ ## {KEY_COLUMNS} - comma-separated list of key columns (time + tags)
|
||||
+ ##
|
||||
+
|
||||
+ ## Check with this is table exists
|
||||
+ ##
|
||||
+ ## Template for MySQL is "SELECT 1 FROM {TABLE} LIMIT 1"
|
||||
+ ##
|
||||
+ table_exists_template = "SELECT 1 FROM {TABLE} LIMIT 1"
|
||||
+
|
||||
+ ## Template to use for generating tables
|
||||
+
|
||||
+ ## Default template
|
||||
+ ##
|
||||
+ # table_template = "CREATE TABLE {TABLE}({COLUMNS})"
|
||||
+
|
||||
+ ## Convert Telegraf datatypes to these types
|
||||
+ [[outputs.sql.convert]]
|
||||
+ integer = "INT"
|
||||
+ real = "DOUBLE"
|
||||
+ text = "TEXT"
|
||||
+ timestamp = "TIMESTAMP"
|
||||
+ defaultvalue = "TEXT"
|
||||
+ unsigned = "UNSIGNED"
|
||||
+```
|
||||
+sql_script is read only once, if you change the script you need to reload telegraf
|
||||
+
|
||||
+## Field names
|
||||
+If database table is not pre-created tries driver to create database. There can be errors as
|
||||
+SQL has strict scheming.
|
||||
+
|
||||
+## Tested Databases
|
||||
+Actually I run the plugin using MySQL
|
||||
+
|
||||
+## TODO
|
||||
+1) Test with other databases
|
||||
+2) More sane testing
|
||||
diff -urN telegraf-1.8.3/plugins/outputs/sql/sql.go telegraf-1.8.3-patch/plugins/outputs/sql/sql.go
|
||||
--- telegraf-1.8.3/plugins/outputs/sql/sql.go 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ telegraf-1.8.3-patch/plugins/outputs/sql/sql.go 2018-11-01 09:59:15.300965038 +0200
|
||||
@@ -0,0 +1,256 @@
|
||||
+package sql
|
||||
+
|
||||
+import (
|
||||
+ "database/sql"
|
||||
+ "fmt"
|
||||
+ "log"
|
||||
+ "strings"
|
||||
+
|
||||
+ _ "github.com/go-sql-driver/mysql"
|
||||
+ _ "github.com/jackc/pgx"
|
||||
+ // These SQL drivers can be enabled if
|
||||
+ // they are added to depencies
|
||||
+ // _ "github.com/lib/pq"
|
||||
+ // _ "github.com/mattn/go-sqlite3"
|
||||
+ // _ "github.com/zensqlmonitor/go-mssqldb"
|
||||
+
|
||||
+ "github.com/influxdata/telegraf"
|
||||
+ "github.com/influxdata/telegraf/plugins/outputs"
|
||||
+)
|
||||
+
|
||||
+type ConvertStruct struct {
|
||||
+ Integer string
|
||||
+ Real string
|
||||
+ Text string
|
||||
+ Timestamp string
|
||||
+ Defaultvalue string
|
||||
+ Unsigned string
|
||||
+}
|
||||
+
|
||||
+type Sql struct {
|
||||
+ db *sql.DB
|
||||
+ Driver string
|
||||
+ Address string
|
||||
+ TableTemplate string
|
||||
+ TableExistsTemplate string
|
||||
+ TagTableSuffix string
|
||||
+ Tables map[string]bool
|
||||
+ Convert []ConvertStruct
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) Connect() error {
|
||||
+ db, err := sql.Open(p.Driver, p.Address)
|
||||
+ if err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ p.db = db
|
||||
+ p.Tables = make(map[string]bool)
|
||||
+
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) Close() error {
|
||||
+ return p.db.Close()
|
||||
+}
|
||||
+
|
||||
+func contains(haystack []string, needle string) bool {
|
||||
+ for _, key := range haystack {
|
||||
+ if key == needle {
|
||||
+ return true
|
||||
+ }
|
||||
+ }
|
||||
+ return false
|
||||
+}
|
||||
+
|
||||
+func quoteIdent(name string) string {
|
||||
+ return name
|
||||
+}
|
||||
+
|
||||
+func quoteLiteral(name string) string {
|
||||
+ return "'" + strings.Replace(name, "'", "''", -1) + "'"
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) deriveDatatype(value interface{}) string {
|
||||
+ var datatype string
|
||||
+
|
||||
+ switch value.(type) {
|
||||
+ case int64:
|
||||
+ datatype = p.Convert[0].Integer
|
||||
+ case uint64:
|
||||
+ datatype = fmt.Sprintf("%s %s", p.Convert[0].Integer, p.Convert[0].Unsigned)
|
||||
+ case float64:
|
||||
+ datatype = p.Convert[0].Real
|
||||
+ case string:
|
||||
+ datatype = p.Convert[0].Text
|
||||
+ default:
|
||||
+ datatype = p.Convert[0].Defaultvalue
|
||||
+ log.Printf("E! Unknown datatype: '%T' %v", value, value)
|
||||
+ }
|
||||
+ return datatype
|
||||
+}
|
||||
+
|
||||
+var sampleConfig = `
|
||||
+# Send metrics to SQL-Database (Example configuration for MySQL/MariaDB)
|
||||
+[[outputs.sql]]
|
||||
+ ## Database Driver, required.
|
||||
+ ## Valid options: mssql (SQLServer), mysql (MySQL), postgres (Postgres), sqlite3 (SQLite), [oci8 ora.v4 (Oracle)]
|
||||
+ driver = "mysql"
|
||||
+
|
||||
+ ## specify address via a url matching:
|
||||
+ ## postgres://[pqgotest[:password]]@localhost[/dbname]\
|
||||
+ ## ?sslmode=[disable|verify-ca|verify-full]
|
||||
+ ## or a simple string:
|
||||
+ ## host=localhost user=pqotest password=... sslmode=... dbname=app_production
|
||||
+ ##
|
||||
+ ## All connection parameters are optional.
|
||||
+ ##
|
||||
+ ## Without the dbname parameter, the driver will default to a database
|
||||
+ ## with the same name as the user. This dbname is just for instantiating a
|
||||
+ ## connection with the server and doesn't restrict the databases we are trying
|
||||
+ ## to grab metrics for.
|
||||
+ ##
|
||||
+ address = "username:password@tcp(server:port)/table"
|
||||
+
|
||||
+ ## Available Variables:
|
||||
+ ## {TABLE} - tablename as identifier
|
||||
+ ## {TABLELITERAL} - tablename as string literal
|
||||
+ ## {COLUMNS} - column definitions
|
||||
+ ## {KEY_COLUMNS} - comma-separated list of key columns (time + tags)
|
||||
+ ##
|
||||
+
|
||||
+ ## Check with this is table exists
|
||||
+ ##
|
||||
+ ## Template for MySQL is "SELECT 1 FROM {TABLE} LIMIT 1"
|
||||
+ ##
|
||||
+ table_exists_template = "SELECT 1 FROM {TABLE} LIMIT 1"
|
||||
+
|
||||
+ ## Template to use for generating tables
|
||||
+
|
||||
+ ## Default template
|
||||
+ ##
|
||||
+ # table_template = "CREATE TABLE {TABLE}({COLUMNS})"
|
||||
+
|
||||
+ ## Convert Telegraf datatypes to these types
|
||||
+ [[outputs.sql.convert]]
|
||||
+ integer = "INT"
|
||||
+ real = "DOUBLE"
|
||||
+ text = "TEXT"
|
||||
+ timestamp = "TIMESTAMP"
|
||||
+ defaultvalue = "TEXT"
|
||||
+ unsigned = "UNSIGNED"
|
||||
+`
|
||||
+
|
||||
+func (p *Sql) SampleConfig() string { return sampleConfig }
|
||||
+func (p *Sql) Description() string { return "Send metrics to SQL Database" }
|
||||
+
|
||||
+func (p *Sql) generateCreateTable(metric telegraf.Metric) string {
|
||||
+ var columns []string
|
||||
+ var pk []string
|
||||
+ var sql []string
|
||||
+
|
||||
+ pk = append(pk, quoteIdent("timestamp"))
|
||||
+ columns = append(columns, fmt.Sprintf("timestamp %s", p.Convert[0].Timestamp))
|
||||
+
|
||||
+ // handle tags if necessary
|
||||
+ if len(metric.Tags()) > 0 {
|
||||
+ // tags in measurement table
|
||||
+ for column := range metric.Tags() {
|
||||
+ pk = append(pk, quoteIdent(column))
|
||||
+ columns = append(columns, fmt.Sprintf("%s %s", quoteIdent(column), p.Convert[0].Text))
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ var datatype string
|
||||
+ for column, v := range metric.Fields() {
|
||||
+ datatype = p.deriveDatatype(v)
|
||||
+ columns = append(columns, fmt.Sprintf("%s %s", quoteIdent(column), datatype))
|
||||
+ }
|
||||
+
|
||||
+ query := strings.Replace(p.TableTemplate, "{TABLE}", quoteIdent(metric.Name()), -1)
|
||||
+ query = strings.Replace(query, "{TABLELITERAL}", quoteLiteral(metric.Name()), -1)
|
||||
+ query = strings.Replace(query, "{COLUMNS}", strings.Join(columns, ","), -1)
|
||||
+ query = strings.Replace(query, "{KEY_COLUMNS}", strings.Join(pk, ","), -1)
|
||||
+
|
||||
+ sql = append(sql, query)
|
||||
+ return strings.Join(sql, ";")
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) generateInsert(tablename string, columns []string) string {
|
||||
+
|
||||
+ var placeholder, quoted []string
|
||||
+ for _, column := range columns {
|
||||
+ placeholder = append(placeholder, fmt.Sprintf("?"))
|
||||
+ quoted = append(quoted, quoteIdent(column))
|
||||
+ }
|
||||
+
|
||||
+ sql := fmt.Sprintf("INSERT INTO %s(%s) VALUES(%s)", quoteIdent(tablename), strings.Join(quoted, ","), strings.Join(placeholder, ","))
|
||||
+ return sql
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) tableExists(tableName string) bool {
|
||||
+ stmt := strings.Replace(p.TableExistsTemplate, "{TABLE}", quoteIdent(tableName), -1)
|
||||
+
|
||||
+ _, err := p.db.Exec(stmt)
|
||||
+ if err != nil {
|
||||
+ return false
|
||||
+ }
|
||||
+ return true
|
||||
+}
|
||||
+
|
||||
+func (p *Sql) Write(metrics []telegraf.Metric) error {
|
||||
+ for _, metric := range metrics {
|
||||
+ tablename := metric.Name()
|
||||
+
|
||||
+ // create table if needed
|
||||
+ if p.Tables[tablename] == false && p.tableExists(tablename) == false {
|
||||
+ createStmt := p.generateCreateTable(metric)
|
||||
+ _, err := p.db.Exec(createStmt)
|
||||
+ if err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ p.Tables[tablename] = true
|
||||
+ }
|
||||
+
|
||||
+ var columns []string
|
||||
+ var values []interface{}
|
||||
+
|
||||
+ // We assume that SQL is making auto timestamp
|
||||
+ //columns = append(columns, "timestamp")
|
||||
+ //values = append(values, metric.Time())
|
||||
+
|
||||
+ if len(metric.Tags()) > 0 {
|
||||
+ // tags in measurement table
|
||||
+ for column, value := range metric.Tags() {
|
||||
+ columns = append(columns, column)
|
||||
+ values = append(values, value)
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for column, value := range metric.Fields() {
|
||||
+ columns = append(columns, column)
|
||||
+ values = append(values, value)
|
||||
+ }
|
||||
+
|
||||
+ sql := p.generateInsert(tablename, columns)
|
||||
+ _, err := p.db.Exec(sql, values...)
|
||||
+
|
||||
+ if err != nil {
|
||||
+ // check if insert error was caused by column mismatch
|
||||
+ log.Printf("E! Error during insert: %v", err)
|
||||
+ return err
|
||||
+ }
|
||||
+ }
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+func init() {
|
||||
+ outputs.Add("sql", func() telegraf.Output { return newSql() })
|
||||
+}
|
||||
+
|
||||
+func newSql() *Sql {
|
||||
+ return &Sql{
|
||||
+ TableTemplate: "CREATE TABLE {TABLE}({COLUMNS})",
|
||||
+ TableExistsTemplate: "SELECT 1 FROM {TABLE} LIMIT 1",
|
||||
+ TagTableSuffix: "_tag",
|
||||
+ }
|
||||
+}
|
||||
diff -urN telegraf-1.8.3/plugins/outputs/sql/sql_test.go telegraf-1.8.3-patch/plugins/outputs/sql/sql_test.go
|
||||
--- telegraf-1.8.3/plugins/outputs/sql/sql_test.go 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ telegraf-1.8.3-patch/plugins/outputs/sql/sql_test.go 2018-11-01 09:59:15.300965038 +0200
|
||||
@@ -0,0 +1,29 @@
|
||||
+package sql
|
||||
+
|
||||
+import (
|
||||
+ "testing"
|
||||
+ // "time"
|
||||
+ // "github.com/influxdata/telegraf"
|
||||
+ // "github.com/influxdata/telegraf/metric"
|
||||
+ // "github.com/stretchr/testify/assert"
|
||||
+)
|
||||
+
|
||||
+func TestSqlQuote(t *testing.T) {
|
||||
+ if testing.Short() {
|
||||
+ t.Skip("Skipping integration test in short mode")
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+func TestSqlCreateStatement(t *testing.T) {
|
||||
+ if testing.Short() {
|
||||
+ t.Skip("Skipping integration test in short mode")
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+func TestSqlInsertStatement(t *testing.T) {
|
||||
+ if testing.Short() {
|
||||
+ t.Skip("Skipping integration test in short mode")
|
||||
+ }
|
||||
+}
|
||||
diff -urN telegraf-1.8.3/README.md telegraf-1.8.3-patch/README.md
|
||||
--- telegraf-1.8.3/README.md 2018-10-30 23:13:52.000000000 +0200
|
||||
+++ telegraf-1.8.3-patch/README.md 2018-11-01 10:00:11.129086395 +0200
|
||||
@@ -237,6 +237,7 @@
|
||||
* [snmp](./plugins/inputs/snmp)
|
||||
* [socket_listener](./plugins/inputs/socket_listener)
|
||||
* [solr](./plugins/inputs/solr)
|
||||
+* [sql](./plugins/outputs/sql) (sql generic output)
|
||||
* [sql server](./plugins/inputs/sqlserver) (microsoft)
|
||||
* [statsd](./plugins/inputs/statsd)
|
||||
* [swap](./plugins/inputs/swap)
|
@ -1,69 +0,0 @@
|
||||
Index: telegraf-1.6.0/plugins/inputs/amqp_consumer/amqp_consumer.go
|
||||
===================================================================
|
||||
--- telegraf-1.6.0/plugins/inputs/amqp_consumer/amqp_consumer.go.original 2018-02-12 11:44:32.583888582 +0100
|
||||
+++ telegraf-1.6.0/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.6.0/etc/telegraf.conf
|
||||
===================================================================
|
||||
--- telegraf-1.6.0/etc/telegraf.conf.original 2018-02-12 14:06:03.304072548 +0100
|
||||
+++ telegraf-1.6.0/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
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fb4087823d0bbc83c04eebfe4a3c0ad595de457afec5f4adaa1b796b25af614d
|
||||
size 969158
|
3
telegraf-1.8.3.tar.gz
Normal file
3
telegraf-1.8.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a8157a7093f29878ba5851abed62966c97d017c127eab915e235842aeafe7e88
|
||||
size 1205303
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:300807b899e61d5705d3fdec18bebf17baec9993f2aeefd8477ea1080521cabc
|
||||
size 34390052
|
3
telegraf-deps.tar.xz
Normal file
3
telegraf-deps.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:423039e7019b6550a791960a232dbdf9427a33fdb4ebda487f8f6938c511b6c5
|
||||
size 41653188
|
351
telegraf.changes
351
telegraf.changes
@ -1,3 +1,354 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 1 08:01:18 UTC 2019 - <nsinger@suse.com>
|
||||
|
||||
- Enable PIE for build
|
||||
|
||||
- Include systemd service file from upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 1 07:54:17 UTC 2018 - Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
|
||||
|
||||
- Update to release 1.8.3
|
||||
- Update deps package
|
||||
|
||||
|
||||
* v1.8.3 [2018-10-30]
|
||||
|
||||
#4873: Add DN attributes as tags in x509_cert input to avoid series overwrite.
|
||||
#4921: Prevent connection leak by closing unused connections in amqp output.
|
||||
#4904: Use default partition key when tag does not exist in kinesis output.
|
||||
#4901: Log the correct error in jti_openconfig.
|
||||
#4937: Handle panic when ipmi_sensor input gets bad input.
|
||||
#4930: Don't add unserializable fields to jolokia2 input.
|
||||
#4866: Fix version check in postgresql_extensible.
|
||||
|
||||
* v1.8.2 [2018-10-17]
|
||||
- Bugfixes
|
||||
|
||||
#4844: Update write path to match updated InfluxDB v2 API.
|
||||
#4840: Fix missing timeouts in vsphere input.
|
||||
#4851: Support uint fields in aerospike input.
|
||||
#4854: Use container name from list if no name in container stats.
|
||||
#4850: Prevent panic in filecount input on error in file stat.
|
||||
#4846: Fix mqtt_consumer connect and reconnect.
|
||||
#4849: Fix panic in logparser input.
|
||||
#4869: Lower authorization errors to debug level in mongodb input.
|
||||
#4875: Return correct response code on ping input.
|
||||
#4874: Fix segfault in x509_cert input.
|
||||
|
||||
* v1.8.1 [2018-10-03]
|
||||
- Bugfixes
|
||||
|
||||
#4750: Fix hardware_type may be truncated in sqlserver input.
|
||||
#4723: Improve performance in basicstats aggregator.
|
||||
#4747: Add hostname to TLS config for SNI support.
|
||||
#4675: Don't add tags with empty values to opentsdb output.
|
||||
#4765: Fix panic during network error in vsphere input.
|
||||
#4766: Unify http_listener error response with InfluxDB.
|
||||
#4769: Add UUID to VMs in vSphere input.
|
||||
#4758: Skip tags with empty values in cloudwatch output.
|
||||
#4783: Fix missing non-realtime samples in vSphere input.
|
||||
#4799: Fix case of timezone/grok_timezone options.
|
||||
|
||||
* v1.8 [2018-09-21]
|
||||
- New Inputs
|
||||
|
||||
activemq - Contributed by @mlabouardy
|
||||
beanstalkd - Contributed by @44px
|
||||
filecount - Contributed by @sometimesfood
|
||||
file - Contributed by @maxunt
|
||||
icinga2 - Contributed by @mlabouardy
|
||||
kibana - Contributed by @lpic10
|
||||
pgbouncer - Contributed by @nerzhul
|
||||
temp - Contributed by @pytimer
|
||||
tengine - Contributed by @ertaoxu
|
||||
vsphere - Contributed by @prydin
|
||||
x509_cert - Contributed by @jtyr
|
||||
|
||||
- New Processors
|
||||
|
||||
enum - Contributed by @KarstenSchnitter
|
||||
parser - Contributed by @Ayrdrie & @maxunt
|
||||
rename - Contributed by @goldibex
|
||||
strings - Contributed by @bsmaldon
|
||||
|
||||
- New Aggregators
|
||||
|
||||
valuecounter - Contributed by @piotr1212
|
||||
|
||||
- New Outputs
|
||||
|
||||
azure_monitor - Contributed by @influxdata
|
||||
influxdb_v2 - Contributed by @influxdata
|
||||
|
||||
- New Parsers
|
||||
|
||||
csv - Contributed by @maxunt
|
||||
grok - Contributed by @maxunt
|
||||
logfmt - Contributed by @Ayrdrie & @maxunt
|
||||
wavefront - Contributed by @puckpuck
|
||||
|
||||
- New Serializers
|
||||
|
||||
splunkmetric - Contributed by @ronnocol
|
||||
|
||||
- Features
|
||||
|
||||
#4236: Add SSL/TLS support to redis input.
|
||||
#4160: Add tengine input plugin.
|
||||
#4262: Add power draw field to nvidia_smi plugin.
|
||||
#4271: Add support for solr 7 to the solr input.
|
||||
#4281: Add owner tag on partitions in burrow input.
|
||||
#4259: Add container status tag to docker input.
|
||||
#3523: Add valuecounter aggregator plugin.
|
||||
#4307: Add new measurement with results of pgrep lookup to procstat input.
|
||||
#4311: Add support for comma in logparser timestamp format.
|
||||
#4292: Add path tag to tail input plugin.
|
||||
#4322: Add log message when tail is added or removed from a file.
|
||||
#4267: Add option to use of counter time in win perf counters.
|
||||
#4343: Add energy and power field and device id tag to fibaro input.
|
||||
#4347: Add http path configuration for OpenTSDB output.
|
||||
#4352: Gather IPMI metrics concurrently.
|
||||
#4362: Add mongo document and connection metrics.
|
||||
#3772: Add enum processor plugin.
|
||||
#4386: Add user tag to procstat input.
|
||||
#4403: Add support for multivalue metrics to collectd parser.
|
||||
#4418: Add support for setting kafka client id.
|
||||
#4332: Add file input plugin and grok parser.
|
||||
#4320: Improve cloudwatch output performance.
|
||||
#3768: Add x509_cert input plugin.
|
||||
#4471: Add IPSIpAddress syntax to ipaddr conversion in snmp plugin.
|
||||
#4363: Add filecount input plugin.
|
||||
#4485: Add support for configuring an AWS endpoint_url.
|
||||
#4491: Send all messages before waiting for results in kafka output.
|
||||
#4492: Add support for lz4 compression to kafka output.
|
||||
#4450: Split multiple sensor keys in ipmi input.
|
||||
#4364: Support StatisticValues in cloudwatch output plugin.
|
||||
#4431: Add ip restriction for the prometheus_client output.
|
||||
#3918: Add pgbouncer input plugin.
|
||||
#2689: Add ActiveMQ input plugin.
|
||||
#4402: Add wavefront parser plugin.
|
||||
#4528: Add rename processor plugin.
|
||||
#4537: Add message 'max_bytes' configuration to kafka input.
|
||||
#4546: Add gopsutil meminfo fields to mem plugin.
|
||||
#4285: Document how to parse telegraf logs.
|
||||
#4542: Use dep v0.5.0.
|
||||
#4433: Add ability to set measurement from matched text in grok parser.
|
||||
#4565: Drop message batches in kafka output if too large.
|
||||
#4579: Add support for static and random routing keys in kafka output.
|
||||
#4539: Add logfmt parser plugin.
|
||||
#4551: Add parser processor plugin.
|
||||
#4559: Add Icinga2 input plugin.
|
||||
#4351: Add name, time, path and string field options to JSON parser.
|
||||
#4571: Add forwarded records to sqlserver input.
|
||||
#4585: Add Kibana input plugin.
|
||||
#4439: Add csv parser plugin.
|
||||
#4598: Add read_buffer_size option to statsd input.
|
||||
#4089: Add azure_monitor output plugin.
|
||||
#4628: Add queue_durability parameter to amqp_consumer input.
|
||||
#4476: Add strings processor.
|
||||
#4536: Add OAuth2 support to HTTP output plugin.
|
||||
#4633: Add Unix epoch timestamp support for JSON parser.
|
||||
#4657: Add options for basic auth to haproxy input.
|
||||
#4411: Add temp input plugin.
|
||||
#4272: Add Beanstalkd input plugin.
|
||||
#4669: Add means to specify server password for redis input.
|
||||
#4339: Add Splunk Metrics serializer.
|
||||
#4141: Add input plugin for VMware vSphere.
|
||||
#4667: Align metrics window to interval in cloudwatch input.
|
||||
#4642: Improve Azure Managed Instance support + more in sqlserver input.
|
||||
#4682: Allow alternate binaries for iptables input plugin.
|
||||
#4645: Add influxdb_v2 output plugin.
|
||||
|
||||
- Bugfixes
|
||||
|
||||
#3438: Fix divide by zero in logparser input.
|
||||
#4499: Fix instance and object name in performance counters with backslashes.
|
||||
#4646: Reset/flush saved contents from bad metric.
|
||||
#4520: Document all supported cli arguments.
|
||||
#4674: Log access denied opening a service at debug level in win_services.
|
||||
#4588: Add support for Kafka 2.0.
|
||||
#4087: Fix nagios parser does not support ranges in performance data.
|
||||
#4088: Fix nagios parser does not strip quotes from performance data.
|
||||
#4688: Fix null value crash in postgresql_extensible input.
|
||||
#4681: Remove the startup authentication check from the cloudwatch output.
|
||||
#4644: Support tailing files created after startup in tail input.
|
||||
#4706: Fix csv format configuration loading.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 18 06:45:26 UTC 2018 - Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
|
||||
|
||||
- Update to release 1.7.4
|
||||
- Update deps package
|
||||
|
||||
* v1.7.4 [2018-08-29]
|
||||
- Bugfixes
|
||||
|
||||
#4534: Skip unserializable metric in influxDB UDP output.
|
||||
#4554: Fix powerdns input tests.
|
||||
#4584: Fix burrow_group offset calculation for burrow input.
|
||||
#4550: Add result_code value for errors running ping command.
|
||||
#4605: Remove timeout deadline for udp syslog input.
|
||||
#4601: Ensure channel closed if an error occurs in cgroup input.
|
||||
#4544: Fix sending of basic auth credentials in http output.
|
||||
#4526: Use the correct GOARM value in the armel package.
|
||||
|
||||
* v1.7.3 [2018-08-07]
|
||||
- Bugfixes
|
||||
|
||||
#4434: Reduce required docker API version.
|
||||
#4498: Keep leading whitespace for messages in syslog input.
|
||||
#4470: Skip bad entries on interrupt input.
|
||||
#4501: Preserve metric type when using filters in output plugins.
|
||||
#3794: Fix error message if URL is unparseable in influxdb output.
|
||||
#4059: Use explicit zpool properties to fix parse error on FreeBSD 11.2.
|
||||
#4514: Lock buffer when adding metrics.
|
||||
|
||||
* v1.7.2 [2018-07-18]
|
||||
- Bugfixes
|
||||
|
||||
#4381: Use localhost as default server tag in zookeeper input.
|
||||
#4374: Don't set values when pattern doesn't match in regex processor.
|
||||
#4416: Fix output format of printer processor.
|
||||
#4422: Fix metric can have duplicate field.
|
||||
#4389: Return error if NewRequest fails in http output.
|
||||
#4335: Reset read deadline for syslog input.
|
||||
#4375: Exclude cached memory on docker input plugin.
|
||||
|
||||
* v1.7.1 [2018-07-03]
|
||||
- Bugfixes
|
||||
|
||||
#4277: Treat sigterm as a clean shutdown signal.
|
||||
#4284: Fix selection of tags under nested objects in the JSON parser.
|
||||
#4135: Fix postfix input handling multi-level queues.
|
||||
#4334: Fix syslog timestamp parsing with single digit day of month.
|
||||
#2910: Handle mysql input variations in the user_statistics collecting.
|
||||
#4293: Fix minmax and basicstats aggregators to use uint64.
|
||||
#4290: Document swap input plugin.
|
||||
#4316: Fix incorrect precision being applied to metric in http_listener.
|
||||
|
||||
* v1.7 [2018-06-12]
|
||||
- Release Notes
|
||||
|
||||
The cassandra input plugin has been deprecated in favor of the jolokia2
|
||||
input plugin which is much more configurable and more performant.
|
||||
There is an example configuration to help you get started.
|
||||
|
||||
For plugins supporting TLS, you can now specify the certificate and keys
|
||||
using tls_ca, tls_cert, tls_key. These options behave the same as the,
|
||||
now deprecated, ssl forms.
|
||||
|
||||
- New Inputs
|
||||
|
||||
aurora - Contributed by @influxdata
|
||||
burrow - Contributed by @arkady-emelyanov
|
||||
fibaro - Contributed by @dynek
|
||||
jti_openconfig_telemetry - Contributed by @ajhai
|
||||
mcrouter - Contributed by @cthayer
|
||||
nvidia_smi - Contributed by @jackzampolin
|
||||
syslog - Contributed by @influxdata
|
||||
|
||||
- New Processors
|
||||
|
||||
converter - Contributed by @influxdata
|
||||
regex - Contributed by @44px
|
||||
topk - Contributed by @mirath
|
||||
|
||||
- New Outputs
|
||||
|
||||
http - Contributed by @Dark0096
|
||||
application_insights: Contribute by @karolz-ms
|
||||
|
||||
- Features
|
||||
|
||||
#3964: Add repl_oplog_window_sec metric to mongodb input.
|
||||
#3819: Add per-host shard metrics in mongodb input.
|
||||
#3999: Skip files with leading .. in config directory.
|
||||
#4021: Add TLS support to socket_writer and socket_listener plugins.
|
||||
#4025: Add snmp input option to strip non fixed length index suffixes.
|
||||
#4035: Add server version tag to docker input.
|
||||
#4044: Add support for LeoFS 1.4 to leofs input.
|
||||
#4068: Add parameter to force the interval of gather for sysstat.
|
||||
#3877: Support busybox ping in the ping input.
|
||||
#4077: Add input plugin for McRouter.
|
||||
#4096: Add topk processor plugin.
|
||||
#4114: Add cursor metrics to mongodb input.
|
||||
#3455: Add tag/integer pair for result to net_response.
|
||||
#4010: Add application_insights output plugin.
|
||||
#4167: Added several important elasticsearch cluster health metrics.
|
||||
#4094: Add batch mode to mqtt output.
|
||||
#4158: Add aurora input plugin.
|
||||
#3839: Add regex processor plugin.
|
||||
#4165: Add support for Graphite 1.1 tags.
|
||||
#4162: Add timeout option to sensors input.
|
||||
#3489: Add burrow input plugin.
|
||||
#3969: Add option to unbound module to use threads as tags.
|
||||
#4183: Add support for TLS and username/password auth to aerospike input.
|
||||
#4190: Add special syslog timestamp parser to grok parser that uses current year.
|
||||
#4181: Add syslog input plugin.
|
||||
#4212: Print the enabled aggregator and processor plugins on startup.
|
||||
#3994: Add static routing_key option to amqp output.
|
||||
#3995: Add passive mode exchange declaration option to amqp consumer input.
|
||||
#4216: Add counter fields to pf input.
|
||||
|
||||
- Bugfixes
|
||||
|
||||
#4018: Write to working file outputs if any files are not writeable.
|
||||
#4036: Add all win_perf_counters fields for a series in a single metric.
|
||||
#4118: Report results of dns_query instead of 0ms on timeout.
|
||||
#4155: Add consul service tags to metric.
|
||||
#2879: Fix wildcards and multi instance processes in win_perf_counters.
|
||||
#2468: Fix crash on 32-bit Windows in win_perf_counters.
|
||||
#4198: Fix win_perf_counters not collecting at every interval.
|
||||
#4227: Use same flags for all BSD family ping variants.
|
||||
#4266: Remove tags with empty values from Wavefront output.
|
||||
|
||||
* v1.6.4 [2018-06-05]
|
||||
- Bugfixes
|
||||
|
||||
#4203: Fix snmp overriding of auto-configured table fields.
|
||||
#4218: Fix uint support in cloudwatch output.
|
||||
#4188: Fix documentation of instance_name option in varnish input.
|
||||
#4195: Revert to previous aerospike library version due to memory leak.
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 27 09:31:27 UTC 2018 - tuukka.pasanen@ilmi.fi
|
||||
|
||||
- Update to release 1.6.0
|
||||
- Update deps package
|
||||
* v1.6.3 [2018-05-21]
|
||||
- Bugfixes
|
||||
#4127: Fix intermittent panic in aerospike input.
|
||||
#4130: Fix connection leak in jolokia2_agent.
|
||||
#4136: Fix jolokia2 timeout parsing.
|
||||
#4142: Fix error parsing dropwizard metrics.
|
||||
#4149: Fix librato output support for uint and bool.
|
||||
#4176: Fix waitgroup deadlock if url is incorrect in apache input.
|
||||
|
||||
* v1.6.2 [2018-05-08]
|
||||
- Bugfixes
|
||||
|
||||
#4078: Use same timestamp for fields in system input.
|
||||
#4091: Fix handling of uint64 in datadog output.
|
||||
#4099: Ignore UTF8 BOM in JSON parser.
|
||||
#4104: Fix case for slave metrics in mysql input.
|
||||
#4110: Fix uint support in cratedb output.
|
||||
|
||||
* v1.6.1 [2018-04-23]
|
||||
- Bugfixes
|
||||
|
||||
#3835: Report mem input fields as gauges instead counters.
|
||||
#4030: Fix graphite outputs unsigned integers in wrong format.
|
||||
#4043: Report available fields if utmp is unreadable.
|
||||
#4039: Fix potential "no fields" error writing to outputs.
|
||||
#4037: Fix uptime reporting in system input when ran inside docker.
|
||||
#3750: Fix mem input "cannot allocate memory" error on FreeBSD based systems.
|
||||
#4056: Fix duplicate tags when overriding an existing tag.
|
||||
#4062: Add server argument as first argument in unbound input.
|
||||
#4063: Fix handling of floats with multiple leading zeroes.
|
||||
#4064: Return errors in mongodb SSL/TLS configuration.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 24 08:20:46 UTC 2018 - mschnitzer@suse.com
|
||||
|
||||
|
@ -16,26 +16,26 @@
|
||||
#
|
||||
|
||||
Name: telegraf
|
||||
Version: 1.6.0
|
||||
Release: 1
|
||||
Version: 1.8.3
|
||||
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
|
||||
Source1: %{name}-deps.tar.xz
|
||||
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
|
||||
Patch0: 0001-Generic-SQL-output-plugin-for-Telegraf.patch
|
||||
|
||||
## /Features ##
|
||||
|
||||
%define _telegraf_dir %{_builddir}/src/github.com/influxdata/%{name}
|
||||
%define _influxdata_dir %{_builddir}/src/github.com/influxdata
|
||||
%define _telegraf_dir %{_influxdata_dir}/%{name}
|
||||
%define _config_dir %{_sysconfdir}/%{name}
|
||||
|
||||
%description
|
||||
@ -45,11 +45,15 @@ Design goals are to have a minimal memory footprint with a plugin system so that
|
||||
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}
|
||||
mkdir -p %{_influxdata_dir}
|
||||
tar -C %{_builddir}/src -xJf %{SOURCE1}
|
||||
tar -C %{_influxdata_dir} -xzf %{SOURCE0}
|
||||
cd %{_influxdata_dir}
|
||||
# If there is allready telegraf then remove it
|
||||
rm -rf %{name}
|
||||
ln -sf %{name}-%{version} %{name}
|
||||
cd %{name}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
export GOPATH="%{_builddir}:$GOPATH"
|
||||
|
Loading…
Reference in New Issue
Block a user