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

# plerion metrics

> Query the time series behind the Plerion dashboards.

With **plerion metrics**, you can read the time series behind the Plerion dashboards, such as failed findings, open risks, or compliance scores over time.

***

## Synopsis

```bash theme={"system"}
plerion metrics query [options]
```

***

## Subcommands

### query

```bash theme={"system"}
plerion metrics query --namespace <ns> --metric-names <list> --interval <seconds> \
  --start <time> --end <time> --stat <stat> [filters]
```

#### Options

| Flag | Type | Description |
| - | - | - |
| `--namespace` | string | **(required)** Metric namespace (see below) |
| `--metric-names` | string | **(required)** One or more metric names in the namespace (comma-separated) |
| `--interval` | number | **(required)** Length of each interval in seconds, from `900` (15 minutes) to `2592000` (30 days) |
| `--start` | string | **(required)** Start of the period, as an ISO 8601 date-time (e.g. `2026-08-01T00:00:00Z`) |
| `--end` | string | **(required)** End of the period, as an ISO 8601 date-time. Must be after `--start` |
| `--stat` | string | **(required)** How data points inside an interval are combined: `sum`, `avg`, `max`, `min`, or `latest` |
| `--integration-ids` | string | Only these integrations (comma-separated IDs) |
| `--integration-group-ids` | string | Only the integrations in these integration groups (comma-separated IDs, up to 100) |
| `--asset-group-ids` | string | Only these asset groups (comma-separated IDs) |
| `--environment-ids` | string | Only the integrations in these environments (comma-separated IDs) |

<Note>
  A filter flag must list at least one ID. An API key limited to specific integrations can only query those integrations.
</Note>

#### Namespaces and metric names

| Namespace | Metric names |
| - | - |
| `finding` | `failed_count`, `failed_count_by_asset_group` |
| `asset` | `total_count`, `number_of_scanned_workloads`, `assets_with_critical_vulnerability_count`, `assets_with_kev_count`, `public_assets_count`, `overly_permissive_assets_count`, `admin_privileged_assets_count`, and more |
| `vulnerabilities` | `open_critical_vulnerabilities`, `open_high_vulnerabilities`, `open_medium_vulnerabilities`, `open_low_vulnerabilities`, `open_unknown_vulnerabilities`, and the same names with the `_by_asset_group` suffix |
| `risk` | `open_count`, `open_count_by_asset_group` |
| `alert` | `total_open_count`, `open_count_by_asset_group` |
| `attack_path` | `total_count`, `total_count_by_asset_group` |
| `compliance` | `compliance_posture_score`, `well_architected_score`, or a compliance framework ID for that framework's score |
| `risk_score` | `tenant_risk_score`, `integration_risk_score`, `asset_group_risk_score` |
| `tenant_unit_consumption` | `tenant_unit_consumption` |

For the full list, see the [query metrics API](/api-reference/metrics/query).

***

## Examples

```bash theme={"system"}
# Daily failed findings for August
plerion metrics query --namespace finding --metric-names failed_count \
  --interval 86400 --start 2026-08-01T00:00:00Z --end 2026-09-01T00:00:00Z --stat latest

# Weekly open critical and high vulnerabilities for one integration
plerion metrics query --namespace vulnerabilities \
  --metric-names open_critical_vulnerabilities,open_high_vulnerabilities \
  --interval 604800 --start 2026-07-01T00:00:00Z --end 2026-09-01T00:00:00Z --stat max \
  --integration-ids 458511a1-9bc2-4fce-97a0-0e3139588e6e

# Tenant risk score as JSON
plerion metrics query --namespace risk_score --metric-names tenant_risk_score \
  --interval 86400 --start 2026-08-01T00:00:00Z --end 2026-09-01T00:00:00Z --stat avg --output json
```

***

## Output columns

Table and text output show one row per metric value in each interval. JSON and YAML output return each interval with all its metric values.

| Column | Description |
| - | - |
| TIMESTAMP | Interval timestamp |
| METRIC | Metric name |
| VALUE | Metric value for the interval |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.