Skip to content

Commit

Permalink
server: Replace %q with %s for InfluxDB line protocol
Browse files Browse the repository at this point in the history
> Line protocol accepts double and single quotes in measurement names, tag keys, tag values, and field keys, but interprets them as part of the name, key, or value.
  • Loading branch information
iBug committed Aug 1, 2024
1 parent 211b8dd commit 754e39d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (s *Server) runHTTPServer() error {
timestamp := time.Now().Truncate(time.Second).UnixNano()
count := s.GetActiveConnectionCount()
// https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/
_, _ = fmt.Fprintf(w, "rsync-proxy,host=%q count=%d %d\n", hostname, count, timestamp)
_, _ = fmt.Fprintf(w, "rsync-proxy,host=%s count=%d %d\n", hostname, count, timestamp)
})

return http.Serve(s.HTTPListener, &mux)
Expand Down

0 comments on commit 754e39d

Please sign in to comment.