Skip to content

Commit

Permalink
Select ALL $job and $instance in example dashboards
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Stäber <[email protected]>
  • Loading branch information
fstab committed Feb 23, 2024
1 parent 6719b13 commit 4a0fedf
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 59 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM redhat/ubi8

ENV GRAFANA_VERSION="10.2.3"
ENV PROMETHEUS_VERSION="2.49.1"
ENV GRAFANA_VERSION="10.3.3"
ENV PROMETHEUS_VERSION="2.50.0"
ENV TEMPO_VERSION="2.3.1"
ENV LOKI_VERSION="2.9.3"
ENV OPENTELEMETRY_COLLECTOR_VERSION="0.92.0"
ENV LOKI_VERSION="2.9.4"
ENV OPENTELEMETRY_COLLECTOR_VERSION="0.95.0"

RUN mkdir /otel-lgtm
WORKDIR /otel-lgtm
Expand Down
67 changes: 41 additions & 26 deletions docker/grafana-dashboard-red-metrics-classic.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 4,
"links": [],
"liveNow": false,
"panels": [
Expand All @@ -44,7 +45,7 @@
"content": "# RED Metrics: (r)equest rate, (e)rror rate, (d)uration\n\nThis dashboard uses explicit bucket histograms and the stable [OpenTelemetry metrics semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/metrics/).\nTo enable this for the [OpenTelemetry Java instrumentation agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation/), set the following environment variables:\n\n```\nexport OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=explicit_bucket_histogram\nexport OTEL_SEMCONV_STABILITY_OPT_IN=http\n```",
"mode": "markdown"
},
"pluginVersion": "10.2.0",
"pluginVersion": "10.3.3",
"type": "text"
},
{
Expand Down Expand Up @@ -104,7 +105,8 @@
}
]
},
"unit": "reqps"
"unit": "reqps",
"unitScale": true
},
"overrides": []
},
Expand Down Expand Up @@ -134,7 +136,7 @@
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=\"$job\", instance=\"$instance\"}[5m]))",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -200,7 +202,8 @@
}
]
},
"unit": "percentunit"
"unit": "percentunit",
"unitScale": true
},
"overrides": []
},
Expand Down Expand Up @@ -230,7 +233,7 @@
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=\"$job\", instance=\"$instance\", http_response_status_code=~\"5..\"}[5m])) / sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=\"$job\", instance=\"$instance\"}[5m]))",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\", http_response_status_code=~\"5..\"}[5m])) / sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -264,7 +267,8 @@
}
]
},
"unit": "reqps"
"unit": "reqps",
"unitScale": true
},
"overrides": []
},
Expand All @@ -277,6 +281,7 @@
"id": 3,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
Expand All @@ -289,9 +294,10 @@
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "10.2.0",
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
Expand All @@ -300,7 +306,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=\"$job\", instance=\"$instance\"}[5m]))",
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"format": "heatmap",
"instant": false,
"legendFormat": "{{le}}",
Expand Down Expand Up @@ -381,7 +387,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=\"$job\", instance=\"$instance\"}[5m]))",
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"format": "heatmap",
"instant": false,
"range": true,
Expand Down Expand Up @@ -439,8 +445,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -480,7 +485,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.95, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=\"$job\", instance=\"$instance\"}[5m])))",
"expr": "histogram_quantile(0.95, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m])))",
"format": "time_series",
"instant": false,
"legendFormat": "95th",
Expand All @@ -494,7 +499,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.5, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=\"$job\", instance=\"$instance\"}[5m])))",
"expr": "histogram_quantile(0.5, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m])))",
"hide": false,
"legendFormat": "50th",
"range": true,
Expand All @@ -506,25 +511,30 @@
}
],
"refresh": "",
"schemaVersion": 38,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"allValue": ".+",
"current": {
"selected": false,
"text": "greeting-service",
"value": "greeting-service"
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values(job)",
"hide": 0,
"includeAll": false,
"includeAll": true,
"label": "",
"multi": false,
"multi": true,
"name": "job",
"options": [],
"query": {
Expand All @@ -538,24 +548,29 @@
"type": "query"
},
{
"allValue": ".+",
"current": {
"selected": false,
"text": "2aa84f09-7278-4972-9dc4-5248bcab0306",
"value": "2aa84f09-7278-4972-9dc4-5248bcab0306"
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values({job=\"$job\"},instance)",
"definition": "label_values({job=~\"$job\"},instance)",
"hide": 0,
"includeAll": false,
"includeAll": true,
"label": "instance",
"multi": false,
"multi": true,
"name": "instance",
"options": [],
"query": {
"query": "label_values({job=\"$job\"},instance)",
"query": "label_values({job=~\"$job\"},instance)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
Expand Down
Loading

0 comments on commit 4a0fedf

Please sign in to comment.