Fix optional field types in fluentd input

(cherry picked from commit 8a68e7424c)
This commit is contained in:
Daniel Nelson 2017-09-12 17:15:19 -07:00
parent 36969a63c2
commit 0d437140bd
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 3 additions and 3 deletions

View File

@ -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)) {