From ad044a9ba569edb04a90dec4da63957ca3c2c41a Mon Sep 17 00:00:00 2001 From: Alexandre Leveille Date: Fri, 23 Aug 2019 11:38:16 -0400 Subject: [PATCH] Fix Circonus publishing by using millisecond timestamps --- dataout/circonus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataout/circonus.go b/dataout/circonus.go index 37b7a6d..d505036 100644 --- a/dataout/circonus.go +++ b/dataout/circonus.go @@ -260,7 +260,7 @@ func (c *CirconusProxy) createMetric(name string, tags []string) *circonusApi.Ch // PushDatapoint will push a datapoint (a value) to the Circonus SaaS platform func (c *CirconusProxy) PushDatapoint(timestamp int64, name string, value string, datatype string) { var sb strings.Builder - payload := fmt.Sprintf("{\"_ts\": %d, \"%s\": \"%s\", \"_type\": \"%s\"}", timestamp, name, value, datatype) + payload := fmt.Sprintf("{\"_ts\": %d, \"%s\": \"%s\", \"_type\": \"%s\"}", timestamp*1000, name, value, datatype) sb.WriteString(payload) req, _ := http.NewRequest("POST", c.httpAPIURL, strings.NewReader(sb.String()))