Skip to content

Instantly share code, notes, and snippets.

@jadunham1
Created April 19, 2022 17:23
Show Gist options
  • Save jadunham1/5ca349895502aaf6be7eebf840b1bfc5 to your computer and use it in GitHub Desktop.
Save jadunham1/5ca349895502aaf6be7eebf840b1bfc5 to your computer and use it in GitHub Desktop.
Difference in terraform plan
- type: PROMETHEUS
name: Prometheus Overall
properties:
analysisServerConfigId: foo
analysisTolerance: LOW
comparisonStrategy: COMPARE_WITH_PREVIOUS
customThresholdRefId: server_deploy_overall
executeWithPreviousSteps: false
metric-thresholds:
- - metricName: Restarts
+ - metricName: 5xx
stateType: PROMETHEUS
thresholdType: ANOMALOUS
thresholds:
customThresholds:
- comparisonType: ABSOLUTE
customThresholdType: ANOMALOUS
ml: 0.0
thresholdCriteria:
actionToTake: FAIL_IMMEDIATELY
occurrences: 0
thresholdType: ALERT_WHEN_HIGHER
- metricName: Restarts
- metricType: VALUE
- transactionName: Kubernetes
- - metricName: 5xx
+ metricName: 5xx
+ metricType: ERROR
+ transactionName: companyServer
+ - metricName: Restarts
stateType: PROMETHEUS
thresholdType: ANOMALOUS
thresholds:
customThresholds:
- comparisonType: ABSOLUTE
customThresholdType: ANOMALOUS
ml: 0.0
thresholdCriteria:
actionToTake: FAIL_IMMEDIATELY
occurrences: 0
thresholdType: ALERT_WHEN_HIGHER
- metricName: 5xx
- metricType: ERROR
- transactionName: companyServer
+ metricName: Restarts
+ metricType: VALUE
+ transactionName: Kubernetes
templateUuid: null
templateVariables: null
templateVersion: null
timeDuration: 15
timeSeriesToAnalyze:
- metricName: 5xx
metricType: ERROR
txnName: CompanyServer
url: sum(rate(company_server_http_response_code_count{response_code='5xx',kubernetes_node_name='$hostName'}[1m]))
- metricName: Restarts
metricType: VALUE
txnName: Kubernetes
url: sum(rate(kube_pod_container_status_restarts_total{pod='$hostName',container='server'}[1m]))
- metricName: 4xx
metricType: ERROR
txnName: companyServer
url: sum(rate(company_server_http_response_code_count{response_code='4xx',kubernetes_node_name='$hostName'}[1m]))
- metricName: Total Requests
metricType: THROUGHPUT
txnName: companyServer
url: sum(rate(company_server_http_response_code_count{kubernetes_node_name='$hostName'}[1m]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment