Skip to content

Instantly share code, notes, and snippets.

@Deuteu
Created May 21, 2018 22:04
Show Gist options
  • Save Deuteu/8068b8299666adbad133d483ac2f1ebb to your computer and use it in GitHub Desktop.
Save Deuteu/8068b8299666adbad133d483ac2f1ebb to your computer and use it in GitHub Desktop.
DogMetrics
curl -X POST -H "Content-type: application/json" \
-d "{ \"series\" :
[{\"metric\":\"yuso_test.examples.count\",
\"points\":[[1526661488, 58]]}
]
}" \
'https://api.datadoghq.com/api/v1/series?api_key=<api_key>
curl -X POST -H "Content-type: application/json" \
-d "{ \"series\" :
[{\"metric\":\"yuso_test.examples.count\",
\"points\":[[1526661488, 58]]}
]
}" \
'https://api.datadoghq.com/api/v1/series?api_key=<api_key>&application_key=<app_key>
require 'rubygems'
require 'dogapi'
api_key = "..."
dog = Dogapi::Client.new(api_key)
# Submit one metric value.
print dog.emit_point('yuso_test.examples.count', 58, host: "jenkins-master.yuso_platform.com")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment