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

# Search and query metrics

> Learn how to search and query metrics in Metrics Explorer.

When you create dashboards, monitors, or use the
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer.md), you use a query to select and
filter the metrics in which you're interested, and then apply functions to them. When
querying data, you can use [regular expressions](https://docs-xcor.paloaltonetworks.com/investigate/querying/regular-expressions.md)
or [glob syntax](https://docs-xcor.paloaltonetworks.com/investigate/querying/glob-syntax.md) where supported.

> [!NOTE]
>
> Prefer a guided lab? Take [Exploring Metrics](https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-metrics.md) for
> Metrics Explorer and DDx, or take [Introduction to PromQL](https://docs-xcor.paloaltonetworks.com/academy/courses/introduction-to-promql.md)
> for PromQL fundamentals.

Palo Alto Networks Cortex XCOR supports these languages for querying metrics
data. Contact [Cortex XCOR Support](https://docs-xcor.paloaltonetworks.com/support.md) to configure the data sources you want
to use.

> [!NOTE]
>
> Regular expression syntax and glob syntax are not interchangeable. Cortex XCOR
> supports only one of these query matching patterns in
> supported areas of the product. For example,
> [drop rules](https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/drop-rules.md#create-a-drop-rule) support glob
> syntax, whereas [recording rules](https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/recording.md) support
> regular expression syntax.

* **[Prometheus Query Language (PromQL)](https://docs-xcor.paloaltonetworks.com/investigate/querying/promql)**: Used with
  Prometheus-compatible metrics. Default.
* **Graphite**: Used with StatsD metrics data. Enabled on request.

  > [!NOTE]
  >
  > Although Cortex XCOR supports both PromQL and Graphite, this document provides
  > information only about the use of PromQL. For more details about Graphite, see the
  > [Graphite documentation](https://graphite.readthedocs.io/en/1.0.0/functions.html).

To help construct, optimize, and debug queries, use the
[Query Builder](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/query-builder.md) or the
[classic Query Builder](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/builder.md). To analyze expensive
queries and understand their relative load, use the
[Query Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/query-analyzer.md).

To write a query from a description instead, use
[query generation](https://docs-xcor.paloaltonetworks.com/investigate/querying/natural-language.md) or ask
[Operator](https://docs-xcor.paloaltonetworks.com/navigate/operator).

## Additional features

Cortex XCOR also provides querying features beyond those covered by using
query languages in its user interface.

* **[Delta queries](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/delta-queries.md):** Query metrics that employ
  delta temporality, as opposed to cumulative temporality.
* **[Alert metrics](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/alert-metrics.md):** Query the `ALERTS`
  metric for triggered alert series and metadata.
* **[Prometheus API access](https://docs-xcor.paloaltonetworks.com/tooling/prometheus-api.md):**
  Interact directly with Prometheus API endpoints for programmatic workflows.


## Related topics

- [Query Optimization for Metrics](https://docs-xcor.paloaltonetworks.com/academy/courses/query-optimization-for-metrics.md)
- [Search and query telemetry data](https://docs-xcor.paloaltonetworks.com/investigate/querying.md)
- [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer.md)
- [Generate queries using natural language](https://docs-xcor.paloaltonetworks.com/investigate/querying/natural-language.md)
- [Troubleshooting missing metrics](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/troubleshooting.md)


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