> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Cognite Data Fusion (CDF) is an industrial DataOps platform. Prefer English docs unless the user asks for another locale.
> Follow /_llms/ index links recursively until you reach page URLs ending in .md. Fetch those Markdown twins instead of HTML.
> For REST APIs, default to calendar version 20230101 (stable). Use 20230101-beta or 20230101-alpha only if the user is on a preview API. Cite paths under /api-reference/concepts/<version>/ and the Cdf-Version header. Prefer the Python SDK (cognite-sdk) unless the user is in JavaScript/TypeScript.
> Start here by task: platform overview /cdf/index.md; data modeling /cdf/dm/index.md; data integration /cdf/integration/index.md; access /cdf/access/index.md; CDF Toolkit /cdf/deploy/cdf_toolkit/index.md; REST quickstart /dev/quickstart.md; Python SDK https://cognite-sdk-python.readthedocs-hosted.com/en/stable/; Atlas AI /cdf/atlas_ai/concepts/index.md; Flows apps /cdf/flows/index.md; MCP and IDE setup /dev/guides/ide_ai_integration.md.
> For implementation work, also load /skill.md.

# Showing activities in Grafana

> Show CogniteActivity instances related to assets, equipment, or time series in Grafana panels with the Activities query tab.

Use the Activities query tab to show [CogniteActivity](https://docs.cognite.com/cdf/dm/dm_reference/dm_core_data_model.md#activity) instances in Grafana panels, for example, the maintenance work orders for a set of pumps in a table panel. The tab finds the activities related to the assets, equipment, or time series you select.

To draw activities on top of a time series chart instead, use the Activities overlay on the [Time series tab](https://docs.cognite.com/cdf/dashboards/guides/grafana/timeseries.md#time-series-tab).

## Before you begin

* Make sure an administrator has [set up the data source](https://docs.cognite.com/cdf/dashboards/guides/grafana/admin_oidc.md) and [turned on the Activities tab](https://docs.cognite.com/cdf/dashboards/guides/grafana/admin_oidc.md#feature-flags).

## Showing activities

![The Activities query tab with the activity view, related instances, show, sort by, and columns fields](https://apps-cdn.cogniteapp.com/@cognite/docs-portal-images/1.0.0/images/cdf/dashboards/grafana/activities-tab.png)

**1. Select the activity view**

On the Activities tab, select the Activity view to read the activities from.

**2. Select the related instances**

* Related to - choose the type of instance the activities are related to: Assets, Equipment, or Time series.
* Instance view - select the view to search the instances in.
* Space - optionally, narrow the search to one space. The default is All spaces.
* Instances - search for the instances by name and select the ones whose activities you want to show.

**3. Choose which activities to show**

In the Show field, choose one of these options:

* Active in time range - the activities that overlap the dashboard time range. This is the default.
* All - every activity related to the instances, whenever it took place.

**4. Choose the columns and sorting**

* Sort by - the properties to sort the activities by, in order. A new query sorts by `startTime`, ascending.
* Columns - the properties to show, in order. If you remove all columns, the panel shows every property of the view, then the instance properties `space`, `externalId`, `createdTime`, and `lastUpdatedTime`.

> [!TIP]
>
> The panel shows one row for each activity related to the instances you selected, with the columns you chose.

## Further reading

* [Core data model](https://docs.cognite.com/cdf/dm/dm_reference/dm_core_data_model.md)
* [Plotting time series with the Time series tab](https://docs.cognite.com/cdf/dashboards/guides/grafana/timeseries.md)
* [Querying records in Grafana](https://docs.cognite.com/cdf/dashboards/guides/grafana/records.md)
