diff options
author | Chris Meyers <chris.meyers.fsu@gmail.com> | 2024-05-31 16:19:16 +0200 |
---|---|---|
committer | Chris Meyers <chrismeyersfsu@users.noreply.github.com> | 2024-05-31 19:55:17 +0200 |
commit | 7b3fb2c2a8b30da5e01e0331895e355599a310ae (patch) | |
tree | 8cf0af01a4b71ac18665277dfef4dd0910e69f7d /tools/grafana | |
parent | Rework which loggers we sent to OTEL (diff) | |
download | awx-7b3fb2c2a8b30da5e01e0331895e355599a310ae.tar.xz awx-7b3fb2c2a8b30da5e01e0331895e355599a310ae.zip |
Add example grafana dashboard
* Per-service log view
Diffstat (limited to 'tools/grafana')
-rw-r--r-- | tools/grafana/dashboards/awx_dashboard.yml | 6 | ||||
-rw-r--r-- | tools/grafana/dashboards/services_dashboard.json | 156 |
2 files changed, 160 insertions, 2 deletions
diff --git a/tools/grafana/dashboards/awx_dashboard.yml b/tools/grafana/dashboards/awx_dashboard.yml index 9692ffe1b7..2f25fc523f 100644 --- a/tools/grafana/dashboards/awx_dashboard.yml +++ b/tools/grafana/dashboards/awx_dashboard.yml @@ -2,7 +2,9 @@ apiVersion: 1 providers: - - name: awx + - name: awx-dashboards + type: file allowUiUpdates: true options: - path: /etc/grafana/provisioning/dashboards/demo_dashboard.json + foldersFromFilesStructure: true + path: /etc/grafana/provisioning/dashboards/ diff --git a/tools/grafana/dashboards/services_dashboard.json b/tools/grafana/dashboards/services_dashboard.json new file mode 100644 index 0000000000..bcf9140724 --- /dev/null +++ b/tools/grafana/dashboards/services_dashboard.json @@ -0,0 +1,156 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 4, + "links": [], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "gridPos": { + "h": 22, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "maxPerRow": 2, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "repeat": "service", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "editorMode": "code", + "expr": "{instance=~\"${instances:pipe}\", job=~\"${service}\"} | json | line_format \"{{.instance}} {{.body}}\"", + "maxLines": 100, + "queryType": "range", + "refId": "A" + } + ], + "title": "Service ${service}", + "type": "logs" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "awx-1", + "value": "awx-1" + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "instances", + "options": [], + "query": { + "label": "instance", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "", + "type": 1 + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "-b", + "provision_instance", + "run_callback_receiver", + "run_dispatcher", + "run_rsyslog_configurer", + "run_ws_heartbeat", + "run_wsrelay", + "uwsgi" + ], + "value": [ + "-b", + "provision_instance", + "run_callback_receiver", + "run_dispatcher", + "run_rsyslog_configurer", + "run_ws_heartbeat", + "run_wsrelay", + "uwsgi" + ] + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "service", + "options": [], + "query": { + "label": "job", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "", + "type": 1 + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "AWX Service Logs", + "uid": "bdndgnhicrt34c", + "version": 12, + "weekStart": "" +} |