Grafana Associate study materials
Grafana Associate study resources

Grafana Associate cheat sheet

Grafana Associate · Keep the key ideas within reach.

Quick reference

Grafana Fundamentals and Navigation

  • Grafana organizes work into organizations, users, teams, folders, and dashboards; a dashboard belongs to exactly one folder, and folder permissions override inherited organization permissions.

  • Roles are hierarchical: Viewer can view dashboards, Editor can create and edit dashboards and folders, Admin can manage users and data sources; the Server Admin role is separate and manages the whole instance.

  • The left-hand navigation has a toggle (grafana.com/docs: 'Toggle menu'); collapsing it gives more canvas space, and the keyboard shortcut is Ctrl/Cmd + M in recent versions.

  • Explore is the ad-hoc query surface: it does not save panels, shows raw query results and a table view, and is the fastest way to validate a data source before building a panel.

  • The command palette (Ctrl/Cmd + K) and the Search shortcut provide quick jumps to dashboards, folders, and pages; search supports tag filters and starred dashboards.

  • Annotations mark point-in-time events on panels; they can be created manually, via the HTTP annotations API, or from a data source query, and are scoped to a dashboard or organization.

  • Dashboard version history stores revisions with a message; restoring a revision creates a new version rather than deleting history, and the diff view shows changed panels.

  • Provisioning (YAML files under provisioning/) makes data sources and dashboards read-only in the UI; changes must be made in the files and reloaded, and the UI hides the save controls.

  • Snapshots are immutable, shareable copies of a dashboard with data baked in; they are not affected by later edits and require the snapshot feature to be enabled.

Quick reference

Data Sources and Queries

  • Each data source has a type (Prometheus, Loki, SQL, etc.), a UID, and default/selected flags; the UID is what dashboards reference, so renaming a data source does not break panels.

  • Prometheus queries use PromQL with a query editor (metric, label filters, operations) or code mode; $__rate_interval and $__interval are Grafana macros substituted at render time.

  • Loki uses LogQL: a stream selector like {job="api"} followed by line filters (|=, !=, |~) and parsers (json, logfmt); metric queries wrap them in rate() or count_over_time().

  • SQL data sources support macros: $__timeFilter(column), $__timeGroup(column, interval), $__unixEpochFilter, and $__timeFrom/$__timeTo for time-range injection.

  • Template variables are interpolated into queries; use the ${var:sqlstring}, ${var:regex}, or ${var:csv} format modifiers to escape values for the target syntax.

  • The query options panel controls Max data points, Min interval, Relative time, and Cache timeout; Max data points caps returned points and drives $__interval resolution.

  • Mixed data source mode lets one panel run queries against several data sources; each query row selects its own data source.

  • Data source health checks (Save & test) verify credentials and connectivity; the Test button on the data source settings page reports the exact error returned by the backend.

  • Query caching (enterprise/cloud) and the data source cache timeout reduce load on slow backends; the cache key includes the query, time range, and variables.

Quick reference

Panels and Visualization

  • Panel types include Time series, Stat, Gauge, Bar gauge, Table, Heatmap, Histogram, Text, Geomap, and Pie chart; the choice depends on whether the data is time-series, categorical, or single-value.

  • The Time series panel is the default for time-stamped data; its Graph styles (lines, bars, points), axis units, and thresholds control appearance.

  • Field overrides apply per-series or per-field settings (unit, color, thresholds, decimals) and take precedence over panel-level defaults.

  • Thresholds color values by numeric boundary; threshold mode Absolute compares to fixed values, Percentage compares to the min/max of the field range.

  • Transformations run after queries and before rendering: Join by field, Merge, Organize fields, Calculate field, Reduce, and Filter data by value are common.

  • Units and decimals are set per field; unit families (bytes, seconds, percent, currency) drive axis formatting and legend display.

  • The Stat and Gauge panels reduce a series to a single value using a calculation (Last, Mean, Max); the Reduce options control which calculation is used.

  • Panel links and data links make values clickable; data links can interpolate ${__value.text}, ${__field.name}, and ${__series.name} into the target URL.

  • The panel inspector exposes raw data, query stats (rows, query time), and JSON; it is the fastest way to debug an empty or wrong panel.

Quick reference

Dashboards, Variables, and Sharing

  • Template variables are defined at the dashboard level with a type (query, custom, textbox, constant, interval, data source, or ad hoc); query variables run against a data source to populate options.

  • The variable refresh setting controls when options reload: On dashboard load, On time range change, or Never; dependent variables should refresh on time range change when they filter by time.

  • Multi-value variables produce comma-separated values; use the ${var:csv} or ${var:regex} format to make them safe for the target query language.

  • Variables can be chained: a variable's query references an earlier variable with $var, and Grafana re-runs the dependent query when the parent changes.

  • Dashboard links, panel links, and the share dialog provide sharing paths; 'Share > Link' can lock the current time range and variables into the URL.

  • Snapshot sharing exports a static copy; 'Export > Save as JSON' or the dashboard API gives the editable definition for version control.

  • Embedding requires allow_embedding = true in the Grafana config; without it, iframes are blocked and the dashboard will not render.

  • Row panels group panels and can be collapsed; collapsed rows do not run their queries until expanded, which reduces load on large dashboards.

  • The dashboard time picker sets the global range; panels can override it with a relative time setting, and the URL carries from/to and var-* parameters for reproducibility.