Skip to content

Commit

Permalink
fix collector scrape and dashboard (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinlparker authored Dec 10, 2023
1 parent b61a935 commit daadf5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@
"type": "prometheus",
"uid": "webstore-metrics"
},
"description": "otelcol prometheus exporter 9464 export rate versus prometheus scrape metrics",
"description": "otelcol prometheus exporter 8888 export rate versus prometheus scrape metrics",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1882,7 +1882,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "(sum_over_time(scrape_samples_scraped{job=\"otel\"}[$__range])/ count_over_time(scrape_samples_scraped{job=\"otel\"}[$__range])/(5*30)) ",
"expr": "(sum_over_time(scrape_samples_scraped{job=\"otel-collector\"}[$__range])/ count_over_time(scrape_samples_scraped{job=\"otel-collector\"}[$__range])/(5*30)) ",
"format": "time_series",
"instant": false,
"legendFormat": "__auto",
Expand Down Expand Up @@ -1910,7 +1910,7 @@
"options": {
"alias": "percent",
"binary": {
"left": "{instance=\"otelcol:9464\", job=\"otel\"}",
"left": "{instance=\"otelcol:9464\", job=\"otel-collector\"}",
"operator": "/",
"reducer": "sum",
"right": "(sum(rate(otelcol_exporter_sent_metric_points{exporter=\"prometheus\"}[1m0s])) )"
Expand Down Expand Up @@ -2080,7 +2080,6 @@
"mode": "reduceRow",
"reduce": {
"include": [
"{instance=\"otelcol:9464\", job=\"otel\"}",
"{instance=\"otelcol:8888\", job=\"otel-collector\"}"
],
"reducer": "sum"
Expand Down
9 changes: 8 additions & 1 deletion src/prometheus/prometheus-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# do not delete this file
global:
evaluation_interval: 30s
scrape_interval: 5s
scrape_configs:
- job_name: otel-collector
static_configs:
- targets:
- 'otelcol:8888'

0 comments on commit daadf5e

Please sign in to comment.