Elasticsearch
Configuring Elasticsearch Backend
The only required field is the Elasticsearch endpoint. This endpoint must be a valid URL for your Elasticsearch cluster.
- Scheme can be
http
orhttps
. Ifhttps
is used - If port is not specified, it defaults to 9200.
The following fields are optional:
- Traces Index - The name of the index where traces will be stored. Defaults to
trace_index
. - Logs Index - The name of the index where logs will be stored. Defaults to
log_index
.
https
If your Elasticsearch cluster uses https
, you can provide the certificate authority (CA) to validate the server certificate.
The content should be the certificate in PEM format (starts with -----BEGIN CERTIFICATE-----
and ends with -----END CERTIFICATE-----
).
If empty, the system root CA will be used to validate the server certificate.
Authentication
If your Elasticsearch cluster requires authentication, you can provide the username and password.
Adding a Destination to Odigos
Odigos makes it simple to add and configure destinations, allowing you to select the specific signals [traces/logs/metrics] that you want to send to each destination. There are two primary methods for configuring destinations in Odigos:
- Using the UI
To add a destination via the UI, follow these steps:- Use the Odigos CLI to access the UI: Odigos UI
odigos ui
-
In the left sidebar, navigate to the
Destination
page. -
Click
Add New Destination
-
Select
Elasticseach
and follow the on-screen instructions.
- Using kubernetes manifests
Save the YAML below to a file (e.g., destination.yaml
) and apply it using kubectl
:
kubectl apply -f destination.yaml
apiVersion: odigos.io/v1alpha1
kind: Destination
metadata:
name: elasticsearch-example
namespace: odigos-system
spec:
data:
ELASTICSEARCH_URL: <Elasticsearch URL>
# ES_TRACES_INDEX: <Traces Index>
# ES_LOGS_INDEX: <Logs Index>
# ELASTICSEARCH_USERNAME: <Username>
# ELASTICSEARCH_CA_PEM: <CA Certificate>
# Note: The commented fields above are optional.
destinationName: elasticsearch
# Uncomment the secretRef below if you are using the optional Secret.
# secretRef:
# name: elasticsearch-secret
signals:
- TRACES
- LOGS
type: elasticsearch
---
# The following Secret is optional. Uncomment the entire block if you need to use it.
# apiVersion: v1
# data:
# ELASTICSEARCH_PASSWORD: <base64 Password>
# kind: Secret
# metadata:
# name: elasticsearch-secret
# namespace: odigos-system
# type: Opaque