How to add a Grafana Dashboard for Logging v2

This document (000020012) is provided subject to the disclaimer at the end of this document.

Situation

Task

Vistualising Logging statistics can be useful for troubleshooting and capacity planning, this article demonstrates how to add a Logging Dashboard to Grafana with persistence throughout pod restarts.

The article focusses on a Logging Dashboard, however these same steps can be adapted to suit other Dashboards.

Pre-requisites

  • A cluster managed by Rancher v2.5.x with Monitoring and Logging v2 apps installed

Steps

  • Upgrade the Logging v2 app to enable the service monitor by clicking 'Chart Options' and 'Edit as YAML', below is an example showing the monitoring.serviceMonitorsection.enabled field set to true:
monitoring:
  serviceMonitor:
    enabled: true

Once complete, the target (cattle-logging-system/rancher-logging) should show up in the Prometheus Targets list with an UP state - this can take a few minutes

Add a logging dashboard to Grafana by adding the JSON to a ConfigMap for persistence. In this example, the Logging Dashboard is used

  • Click the 'Download JSON' button for the Dashboard
  • Replace the data source variable with Prometheus in the downloaded file

For example:

sed 's/${DS_PROMETHEUS}/Prometheus/' logging-dashboard_rev4.json > logging.json
  • Create and label the ConfigMap using the updated logging.json file
kubectl create configmap --from-file logging.json logging -n cattle-dashboards
kubectl label configmap  -n cattle-dashboards logging grafana_dashboard=1
  • Visit the Grafana UI, the Dashboard should now be available

Further reading

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020012
  • Creation Date: 06-May-2021
  • Modified Date:06-May-2021
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center