Skip to content

Commit

Permalink
chore: Added Datadog heartbeat metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
syedimranhassan committed Sep 4, 2024
1 parent 70dceb1 commit d44e1ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions devops/jobs/CreateSandboxCI.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ class CreateSandboxCI {
"series": [{
"metric": "${metricName}",
"points": [['\$(date +%s)', 1]],
"type": "gauge",
"tags": ["env:${deployment}", "app:check-asg-lifecycle-hooks"]
"type": "gauge"
}]
}
"""
Expand Down
5 changes: 2 additions & 3 deletions devops/jobs/SandboxTermination.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,14 @@ class SandboxTermination{
if (opsgenie_heartbeat_name) {
shell('curl -X GET "https://api.opsgenie.com/v2/heartbeats/'+opsgenie_heartbeat_name+'/ping" -H "Authorization: GenieKey ${GENIE_KEY}"')
}
String datadog_heartbeat_name = configuration.get('DATADOG_HEARTBEAT_NAME', '')
String datadog_heartbeat_name = extraVars.get('DATADOG_HEARTBEAT_NAME', '')
if (datadog_heartbeat_name) {
String DD_JSON = """
{
"series": [{
"metric": "${datadog_heartbeat_name}",
"points": [['\$(date +%s)', 1]],
"type": "gauge",
"tags": ["env:${deployment}", "app:check-asg-lifecycle-hooks"]
"type": "gauge"
}]
}
"""
Expand Down

0 comments on commit d44e1ac

Please sign in to comment.