Skip to content

Commit

Permalink
dql and deploy to prod
Browse files Browse the repository at this point in the history
  • Loading branch information
eemrdog committed Jan 19, 2024
1 parent dd1659c commit faa8536
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 270 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,8 @@ pipeline {
stage('Promote to production') {
// no agent, so executors are not used up when waiting for other job to complete
agent none
when {
expression {
return env.DPROD == 'true'
}
}
steps {
build job: '4. Deploy production',
build job: '5. Deploy production',
wait: false,
parameters: [
string(name: 'RELEASE_PRODUCT', value: "${env.RELEASE_PRODUCT}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ configs:
- "app:simplenode"
# objective - dql - response time
objective_name_dql: "Response Time of API Method"
dqlQuery: "fetch logs\n| filter dt.process.name == \"simplenodeservice.staging-jenkins\"\n| filter k8s.namespace.name == \"staging-jenkins\"\n| filter matchesPhrase(content, \"/api/invoke\")\n| parse content, \"DATA '/api/' DATA 'rt:' SPACE? FLOAT:responsetime \" \n| filter isNotNull(responsetime) \n| summarize median(responsetime), alias:response_time "
dqlQuery:
type: compound
format: |
fetch logs
| filter dt.process.name == "{{ .releaseProduct }}.{{ .releaseStage }}"
| filter k8s.namespace.name == "{{ .releaseStage }}"
| filter matchesPhrase(content, "/api/invoke\")\n| parse content, \"DATA '/api/' DATA 'rt:' SPACE? FLOAT:responsetime "
| filter isNotNull(responsetime)
| summarize median(responsetime), alias:response_time "
references:
- releaseProduct
- releaseStage


comparisonOperator: "LESS_THAN_OR_EQUAL"
failure_dql: 500
warning_dql: 400
Expand All @@ -44,7 +57,18 @@ configs:
warning_slo_availability: 99
# objective - slo - process cpu usage
objective_name_dql_cpu_usage: "Process Group Instance CPU Usage"
dqlQuery_cpu_usage: "timeseries cpu=avg(dt.process.cpu.usage), by:{dt.entity.process_group, host.name} \n| lookup [fetch dt.entity.process_group], sourceField:dt.entity.process_group, lookupField:id \n| filter matchesPhrase(lookup.entity.name,\"simplenodeservice.staging-jenkins\") \n| fields usageCpuAvg = arrayAvg(cpu) \n| summarize cpuUsageAvg = max(usageCpuAvg) "
dqlQuery_cpu_usage:
type: compound
format: |
timeseries cpu=avg(dt.process.cpu.usage), by:{dt.entity.process_group, host.name}
| lookup [fetch dt.entity.process_group], sourceField:dt.entity.process_group, lookupField:id
| filter matchesPhrase(lookup.entity.name,"{{ .releaseProduct }}.{{ .releaseStage }}")
| fields usageCpuAvg = arrayAvg(cpu)
| summarize cpuUsageAvg = max(usageCpuAvg)
references:
- releaseProduct
- releaseStage

failure_dql_cpu_usage: 0.4
warning_dql_cpu_usage: 0.3
skip: false
Expand Down

0 comments on commit faa8536

Please sign in to comment.