Skip to content

Commit

Permalink
config: change default scrape interval to 30s
Browse files Browse the repository at this point in the history
This change does the following:
- Update the default interval to 30s to keep consistent with default on
  KSM and cAdvisor
- Update README and unit tests with this change

Change-Id: I303b2b9feb926a89cdcee6a7300c55e6ffa0f97c
Signed-off-by: Ridwan Sharif <[email protected]>
  • Loading branch information
ridwanmsharif committed Dec 5, 2023
1 parent 3ff0923 commit 1b39b77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ telemetry collected by OpenTelemetry.

##### Create RunMonitoring config and store as a secret

Create a `RunMonitoring` config and store it in secret manager. In this example, we use
`run-gmp-config` as the secret name. The file we're using is `default-config.yaml` and it scrapes the main container at port `8080` using the path `/metrics`. You can replace this with any `RunMonitoring` config file that you want the sidecar to use.
Create a `RunMonitoring` config and store it in secret manager. In this example,
we use `run-gmp-config` as the secret name. The file we're using is
`default-config.yaml` and it scrapes the main container at port `8080` using the
path `/metrics` every 30s. You can replace this with any `RunMonitoring` config
file that you want the sidecar to use.

```
gcloud secrets create ${RUN_GMP_CONFIG} --data-file=default-config.yaml
Expand Down
2 changes: 1 addition & 1 deletion confgenerator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func DefaultRunMonitoringConfig() *RunMonitoringConfig {
{
Port: "8080",
Path: "/metrics",
Interval: "60s",
Interval: "30s",
},
},
TargetLabels: RunTargetLabels{Metadata: &allowedTargetMetadata},
Expand Down
4 changes: 2 additions & 2 deletions confgenerator/testdata/builtin/golden/otel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ receivers:
scrape_configs:
- job_name: run-gmp-sidecar
honor_timestamps: false
scrape_interval: 1m
scrape_timeout: 1m
scrape_interval: 30s
scrape_timeout: 30s
metrics_path: /metrics
follow_redirects: false
enable_http2: false
Expand Down

0 comments on commit 1b39b77

Please sign in to comment.