> ## 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.

# Prometheus exporter

## Overview

The Prometheus exporter is a service that exposes OpenSearch index metrics to clients. It provides secure access to metrics for authenticated users via HTTPS Basic Authentication.

## Configuration

To configure a Prometheus target, provide the Prometheus exporter endpoint and the Managed Logging credentials. Credentials are generated in the Managed Logging settings — see [Configure logging and view logs](/cloud/logging-as-a-service/configure-logging-and-view-your-logs) for details. To get the URL endpoint for the region, open the **Prometheus exporter endpoint** tab and copy the API link.

<Frame>
  <img src="https://mintcdn.com/gcore/-tGG7PWTFMtYIhJ9/images/docs/cloud/logging-as-a-service/prometheus-exporter/Logging.jpg?fit=max&auto=format&n=-tGG7PWTFMtYIhJ9&q=85&s=5cc0cdf8b00d0795e5cdff8aa3b269d8" alt="Prometheus exporter endpoint tab" width="701" height="456" data-path="images/docs/cloud/logging-as-a-service/prometheus-exporter/Logging.jpg" />
</Frame>

For example, the Prometheus target configuration for Luxembourg would look like this:

```yaml theme={null}
- job_name: 'your_awesome_job'
  scrape_interval: 5m
  scrape_timeout: 30s
  scheme: https
  static_configs:
      - targets: ['laas-exporter.k1.luxembourg-1.cloud.gcore.com']
  metrics_path: "/v1/opensearch/indices/metrics"
  basic_auth:
    username: 'yourLaasUsername'
    password: 'yourLaasPassword'
```

The Prometheus exporter endpoint for the region is specified in the Gcore Customer Portal.

## Understand the key metrics

The table below explains the key metrics provided by the Prometheus exporter.

| Metric                                                                | Description                                                                                    | Type  |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ----- |
| opensearch\_index\_stats\_index\_current                              | The number of documents currently being indexed to a specific index                            | gauge |
| opensearch\_index\_stats\_query\_cache\_size                          | The total size of the query cache                                                              | gauge |
| opensearch\_index\_stats\_search\_scroll\_current                     | The current count of search scrolls                                                            | gauge |
| opensearch\_indices\_completion\_bytes\_primary                       | The current size of completion data with only primary shards across all nodes in bytes         | gauge |
| opensearch\_indices\_deleted\_docs\_primary                           | The count of deleted documents with only primary shards                                        | gauge |
| opensearch\_indices\_docs\_primary                                    | The count of documents with only primary shards                                                | gauge |
| opensearch\_indices\_mappings\_stats\_fields                          | The current number of fields within the cluster                                                | gauge |
| opensearch\_indices\_segment\_count\_primary                          | The current number of segments with only primary shards across all nodes                       | gauge |
| opensearch\_indices\_segment\_doc\_values\_memory\_bytes\_primary     | The current size of doc values with only primary shards across all nodes in bytes              | gauge |
| opensearch\_indices\_segment\_fields\_memory\_bytes\_primary          | The current size of fields with only primary shards across all nodes in bytes                  | gauge |
| opensearch\_indices\_segment\_fixed\_bit\_set\_memory\_bytes\_primary | The current size of fixed bit sets with only primary shards across all nodes in bytes          | gauge |
| opensearch\_indices\_segment\_index\_writer\_memory\_bytes\_primary   | The current size of index writer with only primary shards across all nodes in bytes            | gauge |
| opensearch\_indices\_segment\_memory\_bytes\_primary                  | The current size of segments with only primary shards across all nodes in bytes                | gauge |
| opensearch\_indices\_segment\_norms\_memory\_bytes\_primary           | The current size of norms with only primary shards across all nodes in bytes                   | gauge |
| opensearch\_indices\_segment\_points\_memory\_bytes\_primary          | The current size of points with only primary shards across all nodes in bytes                  | gauge |
| opensearch\_indices\_segment\_term\_vectors\_memory\_primary\_bytes   | The current size of term vectors with only primary shards across all nodes in bytes            | gauge |
| opensearch\_indices\_segment\_terms\_memory\_primary                  | The current size of terms with only primary shards across all nodes in bytes                   | gauge |
| opensearch\_indices\_segment\_version\_map\_memory\_bytes\_primary    | The current size of version map with only primary shards across all nodes in bytes             | gauge |
| opensearch\_indices\_settings\_total\_fields                          | The index mapping setting for "total\_fields"                                                  | gauge |
| opensearch\_indices\_store\_size\_bytes\_primary                      | The current total size of stored index data in bytes with only primary shards across all nodes | gauge |
| opensearch\_search\_active\_queries                                   | The number of currently active queries                                                         | gauge |
