Skip to main content
The MoleSignal datasource is a Grafana plugin. Grafana reads metrics with PromQL, logs and traces with the field query of the Logs and Traces pages, and any stream with SQL. The jumps between signals come along: a log line opens its trace, an exemplar opens its trace, and every result links back to MoleSignal.
The plugin has a backend that runs on the Grafana server, started by Grafana as a child process. Every request to MoleSignal leaves from the Grafana server with the datasource’s token; browsers never reach MoleSignal. Grafana Cloud reaches a MoleSignal in a private network through Private data source connect.

Requirements

Create a token for Grafana

  1. Open Identity & Access → Service accounts and select Create service account.
  2. Enter the Name grafana and choose the Viewer role.
  3. Select Create account and token, and copy the token. It expires in 365 days and is shown only once.
To keep Grafana to reading, issue the account a narrower token: open Identity & Access → API tokens, select Issue service account token, choose the account, and choose the Read-only observer policy as the Scope. See API tokens and service accounts. One datasource reads one organization: the organization of its token. Every Grafana user who may use the datasource reads what the token may read. Restrict the datasource with Grafana’s datasource permissions, or give each team its own datasource and token.

Install the plugin

Install the release archive with the Grafana CLI, or unpack it into the plugins directory of Grafana, /var/lib/grafana/plugins in the Linux packages and the Docker image:
The plugin is not signed yet. Allow Grafana to load it in grafana.ini, or with the environment variable GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=molesignal-datasource, then restart Grafana:

Add the datasource

  1. In Grafana, open Connections → Data sources, select Add new data source, and choose MoleSignal.
  2. Enter the URL of MoleSignal, such as https://molesignal.example.com, and paste the API token.
  3. Select Save & test.
Save & test reads the version of MoleSignal, checks that the token holds streams.read and streams.query, counts the streams of each type, and checks that MoleSignal reads field queries.

Query types

PromQL

A range query reads one point per step. The step is the panel’s interval, never finer than Min step and never more than 11,000 steps per series. Legend names each series, with {{label}} for the value of a label. Exemplars draws the exemplars of the series, each of which opens its trace. MoleSignal implements a subset of PromQL.

Field queries

Logs, Trace search, and RED take the field query of the MoleSignal Logs and Traces pages, so a query means the same in both places:
The Add a condition row builds a comparison from a Field, an Operator, and a Value, and adds it with AND. RED reads the Entry spans, where a service took a request in, or All spans.

SQL

SQL reads any stream. Stream names the stream the statement is planned against, the table after FROM when empty. Format draws a Table, Time series, or Logs. These macros take the panel’s window: $__interval, $__rate_interval, and $__range work in PromQL and SQL, in alert rules too.

Explore

Variables and ad hoc filters

A query variable lists one of these: A variable with several values selected is written as each language reads a list: (a|b) for =~ in PromQL, 'a', 'b' for IN (...) in SQL, and 'a', 'b' for in (...) in a trace field query. Ad hoc filters narrow PromQL as label matchers in every selector, and field queries as AND conditions. Their keys and values come from the Logs stream of the datasource.

Annotations

An annotation query marks one Source on the panels of a dashboard:

Alerting

Grafana alert rules run PromQL and SQL queries through the backend of the plugin. The alerting of MoleSignal goes further with real-time rules, incidents, on-call, and escalation. An alert that fires in Grafana can still reach MoleSignal as an external alert.

Dashboards

The Dashboards tab of the datasource imports two dashboards:

Limits

The Logs, Traces, and Metrics Drilldown apps of Grafana read Loki, Tempo, and Prometheus only, so they do not open this datasource.
Last modified on October 31, 2026