diff --git a/plugins/inputs/socket/socket.go b/plugins/inputs/socket/socket.go index 0174b2f53..2152ea222 100644 --- a/plugins/inputs/socket/socket.go +++ b/plugins/inputs/socket/socket.go @@ -4,7 +4,6 @@ import ( "bufio" "fmt" "log" - "math" "net" "os" "strings" @@ -14,7 +13,6 @@ import ( "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/internal/encoding" - "github.com/influxdata/telegraf/internal/encoding/graphite" "github.com/influxdata/telegraf/plugins/inputs" _ "github.com/influxdata/telegraf/internal/encoding/graphite" @@ -303,13 +301,6 @@ func (s *Socket) handleLines(buf []byte) { // Parse it. metrics, err := s.encodingParser.Parse(buf) if err != nil { - switch err := err.(type) { - case *graphite.UnsupposedValueError: - // Socket ignores NaN values with no error. - if math.IsNaN(err.Value) { - return - } - } s.logger.Printf("unable to parse lines: %s: %s", buf, err) return }