Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/integration/database/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
nav:

- Database Integrations Overview: index.md
- PostgreSQL: postgresql.md
- Oracle Database: oracle.md
- Snowflake: snowflake.md
- MySQL: mysql.md
- MongoDB: mongodb.md
- Redis: redis.md
- Apache Zookeeper: zookeeper.md
- Cassandra: cassandra.md
- Aerospike: aerospike.md
102 changes: 102 additions & 0 deletions docs/integration/database/aerospike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Aerospike Metrics Integration Guide
description: Learn how to integrate Aerospike with OpenObserve using the OpenTelemetry Collector.
---
# Aerospike Integration with OpenObserve

This guide provides step-by-step instructions to collect and monitor Aerospike metrics using OpenTelemetry Collector and forward them to OpenObserve.

## Overview

Aerospike is a high-performance, distributed database designed for **low-latency, real-time data processing**.
By integrating **Aerospike with OpenTelemetry and OpenObserve**, you can:

- Detect performance bottlenecks
- Gain insights into resource usage
- Monitor database health and metrics in real time

## Steps to Integrate

??? "Prerequisites"
- Running **Aerospike instance(s)**
- OpenObserve account ([Cloud](https://cloud.openobserve.ai/web/) or [Self-Hosted](../../../quickstart/#self-hosted-installation))

??? "Step 1: Install OpenTelemetry Collector Contrib"

Download and install the latest release of `otelcol-contrib`:

```bash
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.115.1/otelcol-contrib_0.115.1_darwin_arm64.tar.gz
tar -xvf otelcol-contrib_0.115.1_darwin_arm64.tar.gz
sudo mv otelcol-contrib /usr/local/bin/
otelcol-contrib --version
```

> Replace `v0.115.1` with the latest version for your OS/architecture.

??? "Step 2: Configure the Collector"

Create a file named `config.yaml` with the following configuration:

```yaml
receivers:
aerospike:
endpoint: "localhost:3000"

processors:
batch:
send_batch_size: 10000
send_batch_max_size: 11000
timeout: 10s

exporters:
otlphttp/openobserve:
endpoint: https://<your-openobserve-endpoint>/api/default
headers:
Authorization: Basic <your_auth_token>
stream-name: default

service:
pipelines:
metrics:
receivers: [aerospike]
processors: [batch]
exporters: [otlphttp/openobserve]
```

Replace `<your-openobserve-endpoint>` and `<your_auth_token>` with your OpenObserve details.

![OpenObserve Redis Creds](../images/databases/otel-metrics-cred.png)


??? "Step 3: Run the Collector"

Start the Collector with your configuration:

```bash
otelcol-contrib --config /path/to/config.yaml
```

![Run the Collector](../images/databases/otel-collector.png)

??? "Step 4: Visualize in OpenObserve"

1. Open **OpenObserve → Streams** and select your metrics stream.
![Visualize Aerospike Metrics](../images/databases/aerospike-stream.png)
2. Explore the metrics, run queries , create dashboards for insights
![Visualize Aerospike Metrics](../images/databases/aerospike-metric-explore.png)


## Troubleshooting

??? "Collector not starting"
- Check the logs for misconfigurations:

```journalctl -u otel-collector -f
```

??? "No metrics in OpenObserve"

- Verify Aerospike is running: systemctl status aerospike
- Check if the Aerospike receiver is binding to the correct port (default: 3000).
- Confirm your OPENOBSERVE_TOKEN and OPENOBSERVE_STREAM are correct.
134 changes: 134 additions & 0 deletions docs/integration/database/cassandra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
title: Cassandra Metrics and Logs Integration Guide
description: This guide explains how to monitor Apache Cassandra by collecting metrics via the OpenTelemetry JMX receiver and logs via file-based collection, and forward them to OpenObserve for visualization and analysis.
---

# Integration with Cassandra Metrics and Logs

This guide provides step-by-step instructions to collect and monitor Apache Cassandra metrics and logs using **OpenTelemetry Collector Contrib** and forward them to OpenObserve.

## Overview

Apache Cassandra is a highly scalable, distributed NoSQL database designed for applications that demand high availability and low-latency read/write operations.

To effectively monitor Cassandra, we will set up OpenTelemetry (OTel) to collect both metrics and logs. OpenTelemetry’s JMX receiver helps gather JVM and Cassandra-specific metrics, while file-based log collection ensures log visibility. The collected logs and metrics will then be forwarded to Openobserve.


## Steps to Integrate

??? "Prerequisites"
- Running **Apache Cassandra** instance(s)
- OpenObserve account ([Cloud](https://cloud.openobserve.ai/web/) or [Self-Hosted](../../../quickstart/#self-hosted-installation))

??? "Step 1: Download OpenTelemetry JMX Metrics JAR"

1. The JMX receiver is used to gather Cassandra and JVM metrics. Install it using the command:

```bash
wget https://github.com/open-telemetry/opentelemetry-java-contrib/releases/download/v1.32.0/opentelemetry-jmx-metrics.jar -O /opt/opentelemetry-java-contrib-jmx-metrics.jar
```

??? "Step 2: Configure JMX Remote Access in Cassandra"

1. Edit `/etc/cassandra/cassandra-env.sh` and add:
```bash
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=9000"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=9000"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
```

2. Restart Cassandra:
```bash
systemctl restart cassandra
```
> Note: The file location may vary depending on your system.

??? "Step 3: Configure the OpenTelemetry Collector"

1. Create or update `/etc/otel-collector-config.yaml`:

```yaml
receivers:
jmx:
jar_path: /opt/opentelemetry-java-contrib-jmx-metrics.jar
endpoint: localhost:9000
target_system: cassandra,jvm
collection_interval: 60s

filelog/std:
include:
- /var/log/cassandra/*.log #File location varies, example for macOS: /opt/homebrew/var/log/cassandra/*.log
start_at: beginning

otlp:
protocols:
grpc:
http:

processors:
resourcedetection:
detectors: ["system"]
system:
hostname_sources: ["os"]
batch:

exporters:
otlphttp/openobserve:
endpoint: https://<your-openobserve-endpoint>/api/default
headers:
Authorization: Basic <your_auth_token>
stream-name: cassandra

service:
pipelines:
metrics:
receivers: [jmx]
processors: [resourcedetection, batch]
exporters: [otlphttp/openobserve]

logs:
receivers: [filelog/std, otlp]
processors: [batch]
exporters: [otlphttp/openobserve]
```

Replace `<your-openobserve-endpoint>` and `<your_auth_token>` with values from OpenObserve’s **Data Sources → Metrics/Logs → Otel Collector**.

![OpenObserve Cassandra Creds](../images/databases/otel-metrics-cred.png)

??? "Step 4: Restart the OpenTelemetry Collector"

1. Restart OpenTelemetry Collector
```bash
systemctl restart otel-collector
```

2. Verify the service:
```bash
systemctl status otel-collector
```

??? "Step 5: Visualize in OpenObserve"

1. Go to **OpenObserve → Streams**.
2. Explore metrics such as node health, read/write latency, and JVM performance.
![Visualize Cassandra Metrics](../images/databases/cassandra-metrics.png)
3. Explore logs to debug errors, failed queries, etc.
![Visualize Cassandra Logs](../images/databases/cassandra-logs.png)


## Troubleshooting

??? "No JMX Metrics Collected"
- Ensure JMX port (9000) is open and Cassandra was restarted after enabling JMX.
- Verify `jar_path` points to the correct JMX metrics jar.

??? "Logs Not Appearing"
- Confirm Cassandra logs exist under `/var/log/cassandra/`.
- Ensure `filelog` receiver has read permissions.

??? "No Data in OpenObserve"
- Double-check exporter endpoint and token.
- Ensure Collector can reach OpenObserve.
- Inspect Collector logs for errors.
107 changes: 107 additions & 0 deletions docs/integration/database/mongodb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: MongoDB Metrics Integration Guide
description: This guide explains how to monitor MongoDB metrics using the OpenTelemetry Collector with the MongoDB receiver, and forward them to OpenObserve for visualization and analysis.
---

# Integration with MongoDB Metrics

This guide provides step-by-step instructions to collect and monitor MongoDB metrics using **OpenTelemetry Collector Contrib** and forward them to OpenObserve.

## Overview

To effectively monitor MongoDB, we will utilize the OpenTelemetry Collector with the MongoDB receiver. This setup allows us to collect metrics from MongoDB instances and push them to OpenObserve, enabling us to visualize performance data and respond proactively to issues.

Supported MongoDB versions: **4.0+**.

## Steps to Integrate

??? "Prerequisites"
- Running **MongoDB instance(s)**
- OpenObserve account ([Cloud](https://cloud.openobserve.ai/web/) or [Self-Hosted](../../../quickstart/#self-hosted-installation))

??? "Step 1: Install OpenTelemetry Collector Contrib"

Download and install the latest release of `otelcol-contrib`:

```bash
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.115.1/otelcol-contrib_0.115.1_darwin_arm64.tar.gz
tar -xvf otelcol-contrib_0.115.1_darwin_arm64.tar.gz
sudo mv otelcol-contrib /usr/local/bin/
otelcol-contrib --version
```

> Replace `v0.115.1` with the latest version for your OS/architecture.

??? "Step 2: Configure the Collector"

Create a file named `config.yaml` with the following configuration:

```yaml
receivers:
mongodb:
hosts:
- endpoint: localhost:27017
username: otel #the user with clusterMonitor permissions
password: password123 #password
collection_interval: 60s
initial_delay: 1s
tls:
insecure: true
insecure_skip_verify: true

processors:
batch:
send_batch_size: 10000
timeout: 10s

exporters:
otlphttp/openobserve:
endpoint: https://<your-openobserve-endpoint>/api/default
headers:
Authorization: Basic <your_auth_token>
stream-name: default

service:
pipelines:
metrics:
receivers: [mongodb]
processors: [batch]
exporters: [otlphttp/openobserve]
```

Replace `<your-openobserve-endpoint>` and `<your_auth_token>` with your actual OpenObserve API endpoint and authentication token, which you can find in your Data Sources -> Databases -> MongoDB

![Collect OpenObserve Credentials](../images/databases/otel-metrics-cred.png)

??? "Step 3: Run the Collector"

Start the Collector with your configuration:

```bash
otelcol-contrib --config /path/to/config.yaml
```
![Run the Collector](../images/databases/otel-collector.png)

??? "Step 4: Visualize in OpenObserve"

1. Open **OpenObserve → Streams**. Select your metrics stream .
![Visualize in OpenObserve](../images/databases/visualize-mongo-metrics.png)
2. Explore MongoDB metrics in dashboards or create custom queries.

## Troubleshooting

??? "Authentication Errors"
- Double-check username/password in config.

??? "Connection Refused"
- Verify MongoDB is running and accessible on the specified port.
- Check firewall or container networking settings.

??? "TLS Issues"
- If using TLS, configure valid certs.
- Use `tls.insecure_skip_verify: true` for testing only.

??? "No Metrics in OpenObserve"
- Check Collector logs for errors.
- Confirm `endpoint` and `Authorization` headers in the exporter are correct.
- Verify OpenObserve is reachable from the Collector.
Loading