mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Add config option to specify whether to use GZip compression in influx write requests
This commit is contained in:
parent
3be11984f2
commit
8837400bf2
@ -53,6 +53,8 @@ type InfluxSink struct {
|
|||||||
InfluxMaxRetries uint `json:"max_retries,omitempty"`
|
InfluxMaxRetries uint `json:"max_retries,omitempty"`
|
||||||
// maximum total retry timeout
|
// maximum total retry timeout
|
||||||
InfluxMaxRetryTime string `json:"max_retry_time,omitempty"`
|
InfluxMaxRetryTime string `json:"max_retry_time,omitempty"`
|
||||||
|
// Specify whether to use GZip compression in write requests
|
||||||
|
InfluxUseGzip bool `json:"use_gzip"`
|
||||||
}
|
}
|
||||||
batch []string
|
batch []string
|
||||||
flushTimer *time.Timer
|
flushTimer *time.Timer
|
||||||
@ -129,6 +131,9 @@ func (s *InfluxSink) connect() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Specify whether to use GZip compression in write requests
|
||||||
|
clientOptions.SetUseGZip(s.config.InfluxUseGzip)
|
||||||
|
|
||||||
// Do not check InfluxDB certificate
|
// Do not check InfluxDB certificate
|
||||||
clientOptions.SetTLSConfig(
|
clientOptions.SetTLSConfig(
|
||||||
&tls.Config{
|
&tls.Config{
|
||||||
|
@ -17,7 +17,8 @@ The `influxdb` sink uses the official [InfluxDB golang client](https://pkg.go.de
|
|||||||
"organization": "myorg",
|
"organization": "myorg",
|
||||||
"ssl": true,
|
"ssl": true,
|
||||||
"flush_delay" : "1s",
|
"flush_delay" : "1s",
|
||||||
"batch_size" : 1000
|
"batch_size" : 1000,
|
||||||
|
"use_gzip": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -40,3 +41,4 @@ Influx client options:
|
|||||||
- `retry_exponential_base`: base for the exponential retry delay
|
- `retry_exponential_base`: base for the exponential retry delay
|
||||||
- `max_retries`: maximum count of retry attempts of failed writes
|
- `max_retries`: maximum count of retry attempts of failed writes
|
||||||
- `max_retry_time`: maximum total retry timeout
|
- `max_retry_time`: maximum total retry timeout
|
||||||
|
- `use_gzip`: Specify whether to use GZip compression in write requests
|
||||||
|
Loading…
Reference in New Issue
Block a user