Skip to content

Instantly share code, notes, and snippets.

@dterei
Created January 24, 2015 01:12
Show Gist options
  • Save dterei/d46d73cee54fe783f70d to your computer and use it in GitHub Desktop.
Save dterei/d46d73cee54fe783f70d to your computer and use it in GitHub Desktop.
New Relic Plugin API Test
#!/bin/sh
curl -vi https://platform-api.newrelic.com/platform/v1/metrics \
-H "X-License-Key: $1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-X POST -d '{
"agent": {
"host": "cluster.memcachier.com"
"pid": 1111,
"version": "0.0.1"
},
"components": [
{
"name": "MemCachier Cache"
"guid": "com.memcachier.newrelic",
"duration": 60,
"metrics": {
"Component/test1[bytes]": 23068672,
"Component/test2[bytes]": 26214400
"Component/test3[Connections/Second]": {
"total": 40,
"count": 60,
"minimum": 0,
"maximum": 10,
"sum_of_squares": 1.3
}
}
}
]}'
@dterei
Copy link
Author

dterei commented Jan 24, 2015

run with: ./newrelic_test.sh <newrelic license key>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment