1
0
mirror of https://github.com/coltoneshaw/CS-Repro-Mattermost.git synced 2025-12-23 18:11:34 +01:00
Files
CS-Repro-Mattermost/files/grafana/README.md
Sven Hüster 7971f12489 switching out promtail for alloy (#22)
* rework grafana log ingestion using alloy

* fix docker-compose.yml formatting
2025-05-12 13:34:23 +02:00

2.3 KiB

Grafana Configuration

This directory contains the configuration for Grafana, which serves as the visualization and dashboarding platform for the CS Repro environment.

Overview

Grafana is an open-source platform for monitoring and observability that allows you to query, visualize, alert on, and understand your metrics, logs, and traces.

Current Setup

  • Running as a single instance (version 10.0.4)
  • Available at http://localhost:3000
  • Default credentials: admin/admin

Directory Structure

  • dashboards/: Contains JSON dashboard definitions

    • enhanced_logs.json: Dashboard for viewing and filtering Mattermost logs
    • kpiMetrics.json: Dashboard for key performance indicators
    • metricsv2.json: Dashboard for detailed application metrics
    • bonusMetrics.json: Dashboard for additional metrics
  • provisioning/: Contains automatic provisioning configurations

    • datasources/: Configures data source connections
    • dashboards/: Sets up dashboard loading

Data Sources

The environment is configured with the following data sources:

  1. Prometheus (Default): For metrics collection

  2. Loki: For log aggregation

    • URL: http://loki:3100
    • Used by the enhanced_logs dashboard
    • Queries using the LogQL language

Log Dashboard

The enhanced_logs.json dashboard is designed to work with logs collected via Alloy and stored in Loki. It provides:

  • Log filtering by level (error, warn, info, debug)
  • Visual metrics about log levels and counts
  • Error tracking and analysis
  • Time-series views of log patterns

The dashboard queries use the label job="mattermost" to filter logs from the Mattermost application.

Best Practices

When modifying dashboards:

  • Export/backup existing dashboards before making major changes
  • Test queries in the Explore interface before adding to dashboards
  • Use variables for consistent filtering across panels
  • Maintain consistent styling

More Information