Skip to content

Commit

Permalink
modify again
Browse files Browse the repository at this point in the history
  • Loading branch information
lawwong committed Nov 26, 2024
1 parent ddf6dae commit 0ae8186
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM dockerhub.paypalcorp.com/golang:1.22-bullseye AS builder
FROM golang:1.22

ENV GOPROXY=https://artifactory.g.devqa.gcp.dev.paypalinc.com/artifactory/api/go/go
WORKDIR /go/src/github.com/paypal/load-watcher
COPY . .
RUN make build
Expand Down
10 changes: 5 additions & 5 deletions pkg/watcher/internal/metricsprovider/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

const (
// Datadog Request Params
DefaultDatadogAddress = "paypal-prod.datadoghq.com"
DefaultDatadogAddress = "datadoghq.com"
datadogHostFilter = "host:"
datadogClusterFilter = "cluster_name:"
datadogHostNameSuffixKey = "DATADOG_HOST_NAME_SUFFIX"
Expand Down Expand Up @@ -340,12 +340,12 @@ Sample input:
{
"name": "query1",
"data_source": "metrics",
"query": "max:cpu.utilization{host:dcg01pimangedp99991.dcg01.chd.paypalinc.com, cluster_name:dcg01bmcaas} by {host}.rollup(max, 60) "
"query": "max:cpu.utilization{host:<host>, cluster_name:<cluster_name>} by {host}.rollup(max, 60) "
},
{
"name": "query2",
"data_source": "metrics",
"query": "max:memory.utilization{host:dcg01pimangedp99991.dcg01.chd.paypalinc.com, cluster_name:dcg01bmcaas} by {host}.rollup(max, 60)"
"query": "max:memory.utilization{host:<host>, cluster_name:<cluster_name>} by {host}.rollup(max, 60)"
}
],
"interval": 900
Expand All @@ -366,14 +366,14 @@ Sample metricData output:
"series": [
{
"group_tags": [
"host:dcg01pimangedp99991.dcg01.chd.paypalinc.com"
"host:<host>"
],
"query_index": 0,
"unit": null
},
{
"group_tags": [
"host:dcg01pimangedp99991.dcg01.chd.paypalinc.com"
"host:<host>>"
],
"query_index": 1,
"unit": null
Expand Down
2 changes: 1 addition & 1 deletion pkg/watcher/internal/metricsprovider/datadog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// Below environment variables need to be set in order to run the unit test
// DATADOG_CLUSTER_NAME
// METRICS_PROVIDER_ADDRESS defaults to paypal-prod.datadoghq.com
// METRICS_PROVIDER_ADDRESS defaults to datadoghq.com
// METRICS_PROVIDER_APP_KEY
// METRICS_PROVIDER_TOKEN
// host
Expand Down

0 comments on commit 0ae8186

Please sign in to comment.