Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
telegraf-nftables
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Due to inactivity, this project is scheduled to be deleted on 2035-04-24.
Why is this scheduled?
Show more breadcrumbs
vqgroup
telegraf-nftables
Commits
06176ef4
Unverified
Commit
06176ef4
authored
8 years ago
by
Cameron Sparr
Browse files
Options
Downloads
Patches
Plain Diff
Only set the buffer size once
fixes #2380
parent
2a3448c8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
internal/models/running_output.go
+1
-2
1 addition, 2 deletions
internal/models/running_output.go
with
2 additions
and
2 deletions
CHANGELOG.md
+
1
−
0
View file @
06176ef4
...
...
@@ -62,6 +62,7 @@ be deprecated eventually.
-
[
#2358
](
https://github.com/influxdata/telegraf/pull/2358
)
: Create pidfile with 644 permissions & defer file deletion.
-
[
#2282
](
https://github.com/influxdata/telegraf/issues/2282
)
: Reloading telegraf freezes prometheus output.
-
[
#2390
](
https://github.com/influxdata/telegraf/issues/2390
)
: Empty tag value causes error on InfluxDB output.
-
[
#2380
](
https://github.com/influxdata/telegraf/issues/2380
)
: buffer_size field value is negative number from "internal" plugin.
## v1.2.1 [2017-02-01]
...
...
This diff is collapsed.
Click to expand it.
internal/models/running_output.go
+
1
−
2
View file @
06176ef4
...
...
@@ -122,9 +122,9 @@ func (ro *RunningOutput) AddMetric(m telegraf.Metric) {
// Write writes all cached points to this output.
func
(
ro
*
RunningOutput
)
Write
()
error
{
nFails
,
nMetrics
:=
ro
.
failMetrics
.
Len
(),
ro
.
metrics
.
Len
()
ro
.
BufferSize
.
Set
(
int64
(
nFails
+
nMetrics
))
log
.
Printf
(
"D! Output [%s] buffer fullness: %d / %d metrics. "
,
ro
.
Name
,
nFails
+
nMetrics
,
ro
.
MetricBufferLimit
)
ro
.
BufferSize
.
Incr
(
int64
(
nFails
+
nMetrics
))
var
err
error
if
!
ro
.
failMetrics
.
IsEmpty
()
{
// how many batches of failed writes we need to write.
...
...
@@ -176,7 +176,6 @@ func (ro *RunningOutput) write(metrics []telegraf.Metric) error {
log
.
Printf
(
"D! Output [%s] wrote batch of %d metrics in %s
\n
"
,
ro
.
Name
,
nMetrics
,
elapsed
)
ro
.
MetricsWritten
.
Incr
(
int64
(
nMetrics
))
ro
.
BufferSize
.
Incr
(
-
int64
(
nMetrics
))
ro
.
WriteTime
.
Incr
(
elapsed
.
Nanoseconds
())
}
return
err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment