Add collectd parser (#2654)

This commit is contained in:
Daniel Nelson
2017-04-12 10:41:26 -07:00
committed by GitHub
parent 198ef8de3a
commit c4634c1743
12 changed files with 592 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ func (ssl *streamSocketListener) read(c net.Conn) {
for scnr.Scan() {
metrics, err := ssl.Parse(scnr.Bytes())
if err != nil {
ssl.AddError(fmt.Errorf("unable to parse incoming line"))
ssl.AddError(fmt.Errorf("unable to parse incoming line: %s", err))
//TODO rate limit
continue
}
@@ -105,7 +105,7 @@ func (psl *packetSocketListener) listen() {
metrics, err := psl.Parse(buf[:n])
if err != nil {
psl.AddError(fmt.Errorf("unable to parse incoming packet"))
psl.AddError(fmt.Errorf("unable to parse incoming packet: %s", err))
//TODO rate limit
continue
}