Skip to content

Commit

Permalink
update: content
Browse files Browse the repository at this point in the history
  • Loading branch information
harshini-rangaswamy committed Nov 25, 2024
1 parent 582997e commit f1beea7
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions docs/products/opensearch/howto/os-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,83 @@ title: Aiven for OpenSearch® metrics available via Prometheus
sidebar_label: OpenSearch metrics with Prometheus
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import HostMetrics from "@site/static/includes/host-metrics.md";
import ConsoleLabel from "@site/src/components/ConsoleIcons"
import LimitedBadge from "@site/src/components/Badges/LimitedBadge";

Monitor and optimize your Aiven for OpenSearch service with metrics available via Prometheus.
These metrics help track cluster health, replication status, and overall performance.

## Access Prometheus metrics
## Prerequisites

Before accessing metrics, ensure that:

To access Prometheus metrics for your Aiven for OpenSearch service, ensure the Prometheus
integration is set up. For instructions,
see [Prometheus integration](/docs/platform/howto/integrations/prometheus-metrics).
- Prometheus integration is enabled. For setup instructions, see
[Prometheus integration setup](/docs/platform/howto/integrations/prometheus-metrics).
- Note the Prometheus **username** and **password** from the **Integration endpoints**
section in the [Aiven console](https://console.aiven.io/).

## Access Prometheus metrics

### Use a browser
<Tabs groupId="group1">
<TabItem value="browser" label="Browser" default>

1. Go to your service's <ConsoleLabel name="overview"/>page in the
[Aiven console](https://console.aiven.io/).
1. Open your service's <ConsoleLabel name="overview"/> page in the
[Aiven console](https://console.aiven.io/).
1. In the **Connection information** section, click the **Prometheus** tab.
1. Copy the **Service URI**.
1. Paste the Service URI into your browser's address bar.
1. When prompted, enter your Prometheus credentials.
1. Click **Login**.

### Use `curl`
</TabItem>
<TabItem value="curl" label="Curl">

Retrieve metrics using the `curl` command. Ensure you have:

- **Prometheus credentials**: Find them in the **Prometheus** section under
**Integration endpoints** in the[Aiven console](https://console.aiven.io/).
- **Aiven for OpenSearch hostname** and **Prometheus port**: Find them in
the **Connection information** section on your service's
<ConsoleLabel name="overview"/>page.

Run the following command:
To retrieve metrics, run the following `curl` command:

```bash
curl --user '<PROMETHEUS_USER>:<PROMETHEUS_PASSWORD>' \
'https://<OPENSEARCH_HOSTNAME>:<PROMETHEUS_PORT>/metrics'
curl --user 'USERNAME:PASSWORD' PROMETHEUS_URL/metrics
```

Replace the placeholders with your actual credentials and connection details.
Replace `USERNAME:PASSWORD` with your Prometheus credentials and `PROMETHEUS_URL`
with the Service URI from the **Connection information** section.

</TabItem>
</Tabs>

<HostMetrics />

## OpenSearch-specific metrics

The following metrics are specific to Aiven for OpenSearch and offer detailed insights
into the state and performance of your OpenSearch service.
These metrics provide insights into the performance and health of your Aiven for
OpenSearch service.

### Node statistics

Provides metrics for each node, including CPU and memory usage, disk I/O, and
JVM statistics. For more information, see the
Track node metrics such as CPU and memory usage, disk I/O, and JVM statistics. For more
information, see the
[node stats API](https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-stats/).

### Cluster statistics

Aggregates cluster-level metrics, such as the number of indices, shard distribution,
and memory usage. For more information, see the
Track cluster-level metrics, including the number of indices, shard distribution, and
memory usage. For more information, see the
[cluster stats API](https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/).

### Cluster health

Monitors the health of the cluster, with granular metrics available at the index level.
Use `local` with `level=index` to view index-specific health status.
Monitor cluster health with granular metrics available at the index level. Use `local`
with `level=index` to view index-specific health status.
For more information, see
the [cluster health API](https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/).

### Cross-cluster replication (CCR) stats <LimitedBadge/>

- **Leader stats:** Tracks replication metrics from the leader cluster, such as
replication lag and index synchronization status. For more information, see
- **Leader stats:** Monitor replication metrics from the leader cluster, including
replication lag and synchronization status. For more information, see
the [leader cluster stats API](https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-leader-cluster-stats).
- **Follower stats:** Tracks metrics for the follower cluster, including replication
delays and error rates, to ensure data consistency. For more information, see the
- **Follower stats:** Monitor follower cluster metrics, including replication delays and
error rates, to maintain data consistency. For more information, see the
[follower cluster stats API](https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-follower-cluster-stats).

### Accessing metrics
You can view these metrics via Prometheus, which Aiven integrates with Telegraf. For
information on setting up Prometheus, see [Prometheus integration](https://aiven.io/docs/platform/howto/prometheus-integration).

0 comments on commit f1beea7

Please sign in to comment.