Skip to content

Commit

Permalink
Add run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chaspy committed Jan 24, 2021
1 parent f3b3324 commit 8484188
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# ref: https://docs.datadoghq.com/api/latest/metrics/#submit-metrics
api_key=${DATADOG_API_KEY}

export NOW="$(date +%s)"
curl -X POST "https://api.datadoghq.com/api/v1/series?api_key=${DATADOG_API_KEY}" \
-H "Content-Type: application/json" \
-d @- << EOF
{
"series": [
{
"metric": "chaspy.tag.test",
"points": [
[
"${NOW}",
"1234.5"
]
],
"tags": [
"environment:test",
"environment:staging",
"author:chaspy"
]
}
]
}
EOF

0 comments on commit 8484188

Please sign in to comment.