I am setting up things with Telegraf with Jenkins plugin and InfluxDB v2.
I am using command:
curl http://localhost:9999/api/v2/query?org=ORG_NAME -XPOST -sS -H 'Authorization: Token XXXXXXX' -H 'Accept: application/csv' -H 'Content-type: application/vnd.flux' -d 'from(bucket: "jenkins") |> range(start:-5m) |> filter(fn: (r) => r._field == "result_code") |> filter(fn: (r) => r._measurement == "jenkins_stat")'
Since the curl url now takes ORG, I am not sure how can I get JSON format from the curl command.
If I try to change csv to json above this throws me error.
Appreciate your guidance.