Skip to content

Commit

Permalink
Fix optional field types in fluentd input
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Sep 13, 2017
1 parent cc63b3b commit 8a68e74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/inputs/fluentd/fluentd.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ func (h *Fluentd) Gather(acc telegraf.Accumulator) error {
}

if p.BufferQueueLength != nil {
tmpFields["buffer_queue_length"] = p.BufferQueueLength
tmpFields["buffer_queue_length"] = *p.BufferQueueLength

}
if p.RetryCount != nil {
tmpFields["retry_count"] = p.RetryCount
tmpFields["retry_count"] = *p.RetryCount
}

if p.BufferTotalQueuedSize != nil {
tmpFields["buffer_total_queued_size"] = p.BufferTotalQueuedSize
tmpFields["buffer_total_queued_size"] = *p.BufferTotalQueuedSize
}

if !((p.BufferQueueLength == nil) && (p.RetryCount == nil) && (p.BufferTotalQueuedSize == nil)) {
Expand Down

0 comments on commit 8a68e74

Please sign in to comment.