Created
January 24, 2015 01:12
-
-
Save dterei/d46d73cee54fe783f70d to your computer and use it in GitHub Desktop.
New Relic Plugin API Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} | |
} | |
} | |
]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run with:
./newrelic_test.sh <newrelic license key>