Skip to content

Commit

Permalink
Fix Circonus publishing by using millisecond timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Leveille committed Aug 23, 2019
1 parent 98d7478 commit ad044a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataout/circonus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit ad044a9

Please sign in to comment.