Developer Portal
Connector Guides
API ReferenceConsole

Monitoring Connectors with Grafana

What's Grafana?

Grafana is an open-source analytics and monitoring platform that allows you to visualize time series data through customizable dashboards. Prometheus is a popular option to store time series metrics, and Grafana lets you query and visualize that data.

How does it work?

Connectors use the OpenTelemetry SDK to push metrics to the OpenTelemetry Collector, which caches the latest metrics for 1 hour. Prometheus scrapes the Collector every 1 minute and stores the data for 6 months on disk.

Access Connector Metrics via Grafana with Prometheus

Prerequisites

Create a Personal Access Token with CONNECTOR_READ_ALL scope.

Configure the data source

First, log into Grafana (your company's instance).

Select Connections > Data Sources and select Prometheus.

Screenshot of Grafana > Connections > Data sources, Add Data Source with an arrow pointing to Prometheus under Time series databases.

Under Connection, for the Prometheus Server URL enter this server:

Copy
1
https://api.mapped.com/metrics

Screenshot of the Grafana Prometheus connection configuration, including Name, Connection, and Authentication.

Under Authentication, select Basic authentication and enter your Personal Access Token in the Password field.

Select Save & test, and wait for a green success message Successfully queried the Prometheus API to confirm.

Screenshot of success message confirming Successfully queried the Prometheus API. Next, you can start to visualize data by building a dashboard, or by querying data in the Explore View.

Explore Metrics

You can filter with these attributes:

  • org_id - Your organization's unique identifier
  • connector_id - A specific connector's unique identifier
  • connector_type_id - The type of connector (e.g., "airthings", "cisco-spaces")

Key metrics

  • destination_connector_egress_bytes_sum: Total bytes sent to a destination connector over time.
  • total_contribution_bytes_sum: Total bytes ingested into Mapped’s graph by a source connector (includes time series & merged data).

Build a query

In Grafana, select the Explore tab.

First select the Metric desired: destination_connector_egress_bytes_sum for destination connectors, or total_contribution_bytes_sum for source connectors.

Screenshot of Grafana Explore query builder, with Metric destination_connector_egress_bytes_bucket and Label Filters selected to show connector_id and connector_type_id in the dropdown.

Select attributes for filtering underr Label Filters. Select connector_id, connector_type_id or org_id. Enter the identifier under Value.

Screenshot of Grafana Explore query builder, with Metric total_contribution_bytes_sum and Label Filters selected to show connector_id and connector_type_id in the dropdown.

Click the helpful hint: add rate to adjust the interval of the histogram displayed.

Screenshot of Grafana Explore query builder close up, with hint: add rate circled.

Click the Run Query button in the upper right to run your query and view results.

Screenshot of Granana Explore query builder with the Run Query button circled in the upper right.

The graph will display the metrics for the past hour as a histogram. A histogram represents the distribution of numerical data. You can toggle the graph between lines, bars, points, stacked lines, and stacked bars to illustrate the frequency within your selected interval.

Screenshot of Grafana Explore Queries with a histogram line graph. The query is total contribution bytes sum for a specific connector with a rate of a 10 minute range.