Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Oct 1, 2024
1 parent a9a4d39 commit 286af9b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/OpenSearchMetricsQuery.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ class OpenSearchMetricsQuery {
script: """
set -e
set +x
qu=(curl -s -XGET "${metricsUrl}/${indexName}/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.')
echo "Query is $qu"
curl -s -XGET "${metricsUrl}/${indexName}/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.'
""",
returnStdout: true
).trim()
this.script.println(response)
return new JsonSlurper().parseText(response)
}
}

0 comments on commit 286af9b

Please sign in to comment.