Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Updated jenkins jobs to export RDS deadlocks to datadog #1788

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions devops/jobs/ExportRDSDeadLocks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ExportRDSDeadLocks {
wrappers {
credentialsBinding {
usernamePassword("USERNAME", "PASSWORD", "${deployment}-${environment}-export-dead-locks-credentials")
usernamePassword("SPLUNKUSERNAME", "SPLUNKPASSWORD", "export-dead-locks-splunk-credentials")
string("DDAPIKEY", "datadog_api_key")
def variable = "${deployment}-export-dead-locks"
string("ROLE_ARN", variable)
}
Expand All @@ -33,7 +33,7 @@ class ExportRDSDeadLocks {
cron("H H * * *")
}

def INDEXNAME = "${environment}-${deployment}"
def INDEXNAME = "edx-logs"

def rdsignore = ""
extraVars.get('IGNORE_LIST').each { ignore ->
Expand All @@ -48,8 +48,6 @@ class ExportRDSDeadLocks {
environmentVariables {
env('AWS_DEFAULT_REGION', extraVars.get('REGION'))
env('ENVIRONMENT', environment)
env('HOSTNAME', extraVars.get('SPLUNKHOSTNAME'))
env('PORT', extraVars.get('PORT'))
env('INDEXNAME', INDEXNAME)
env('RDSIGNORE', rdsignore)
env('WHITELISTREGIONS', whitelistregions)
Expand Down
9 changes: 8 additions & 1 deletion devops/resources/export-dead-locks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ if [[ ! -v WHITELISTREGIONS ]]; then
WHITELISTREGIONS=""
fi

python export_dead_locks.py --environment ${ENVIRONMENT} --hostname ${HOSTNAME} --port ${PORT} --indexname ${INDEXNAME} ${RDSIGNORE} ${WHITELISTREGIONS}
# Check if ENVIRONMENT is set to "stage"
# As we have "stg" in datadog and "stage" in the configuration
if [[ "$ENVIRONMENT" == "stage" ]]; then
# Update ENVIRONMENT to "stg"
ENVIRONMENT="stg"
fi

python export_dead_locks_dd.py --environment ${ENVIRONMENT} --indexname ${INDEXNAME} ${RDSIGNORE} ${WHITELISTREGIONS}
Loading