Change duration -> internal and implement private gopsutil methods

This commit is contained in:
Cameron Sparr
2015-11-10 14:40:39 -07:00
parent a8bcc51071
commit acf9c1141a
20 changed files with 104 additions and 667 deletions

View File

@@ -2,6 +2,7 @@ package telegraf
import (
"fmt"
"log"
"sync"
"time"
@@ -107,7 +108,10 @@ func (ac *accumulator) AddFields(
measurement = ac.prefix + measurement
}
pt := client.NewPoint(measurement, tags, fields, timestamp)
pt, err := client.NewPoint(measurement, tags, fields, timestamp)
if err != nil {
log.Printf("Error adding point [%s]: %s\n", measurement, err.Error())
}
if ac.debug {
fmt.Println("> " + pt.String())
}