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

# View WAAP statistics in Grafana

The Gcore WAAP datasource plugin for Grafana lets security and DevOps teams visualize traffic statistics for WAAP-protected domains directly in Grafana dashboards. It connects to the Gcore WAAP Statistics API and renders time-series panels without requiring any manual API calls.

The plugin supports the following metrics:

* **Total Requests** — the number of HTTP requests processed by WAAP across protected domains within the selected time range.
* **Total Bytes** — the total volume of traffic, displayed in kilobytes (KB).

Metrics can be queried at two granularity levels:

* **1h** — one data point per hour.
* **1d** — one data point per day.

<Note>
  The plugin requires Grafana 10.4.0 or higher.
</Note>

## Download and install the plugin

1. Get the plugin from the [GitHub repository](https://github.com/G-Core/waap-stats-datasource-plugin) using either method:
   * **Clone the repository:** run `git clone https://github.com/G-Core/waap-stats-datasource-plugin.git` in a terminal.
   * **Download as ZIP:** on the GitHub page, click **Code** > **Download ZIP**, then extract the archive.

2. Copy the `gcorelabs-waap-stats-datasource` folder into the Grafana plugins directory. The default location is:
   * **Linux/macOS:** `/var/lib/grafana/plugins`
   * **Windows:** `C:\Program Files\GrafanaLabs\grafana\data\plugins`

3. [Restart Grafana](https://grafana.com/docs/grafana/latest/setup-grafana/restart-grafana/) to load the new plugin.

## Configure the data source

After installing the plugin, add it as a data source in Grafana and authenticate it with a Gcore API token.

1. Log in to Grafana, then open the main menu and navigate to **Connections** > **Data sources**.

2. Click **Add new data source**.

3. Search for `Waap` and select the **Waap** plugin from Gcore.

4. In the **WAAP API** section, fill in the configuration fields:

   * **API URL (host only)** — enter `api.gcore.com`. Change this only if connecting to a dedicated or on-premises Gcore API endpoint.
   * **Authorization header value** — enter the permanent API token generated in the Gcore Customer Portal. The value must include the `APIKey` prefix:

     ```
     APIKey 7711$eyJ0eXAiOiJKV1Q...
     ```

   To generate a token, log in to the [Gcore Customer Portal](https://portal.gcore.com) and navigate to **Profile** > **API tokens** > **Create**.

5. Click **Save & Test**.

<p>A successful connection displays a confirmation message with the authenticated account name. If the test fails, verify that the API token is valid and includes the `APIKey` prefix.</p>

## Configure a dashboard

With the data source connected, create a dashboard panel to visualize WAAP metrics.

1. In the Grafana main menu, click **+** > **New dashboard**, then click **Add visualization**.

2. In the **Data source** dropdown at the top of the query editor, select **Waap**.

3. In the query editor, configure the query:

   * **Metric** — select the metric to display:
     * `total_requests` — renders the request count over time.
     * `total_bytes` — renders traffic volume in KB over time.
   * **Granularity** — select the time resolution:
     * `1h` — one data point per hour.
     * `1d` — one data point per day.

4. Click **Apply** to add the panel to the dashboard.

5. To save the dashboard, click **Save dashboard** in the upper-right corner, enter a name, and click **Save**.
