Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
acf1cdc
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
c842150
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
b83ea99
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB Apr 26, 2023
9850688
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
0db3223
Merge branch 'main' into opensearch-observability-otel
YANG-DB May 2, 2023
bf41276
add curl to the basic docker O/S
YANG-DB May 3, 2023
4292136
Merge pull request #1 from open-telemetry/main
YANG-DB May 3, 2023
f0600be
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
418d196
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 4, 2023
b0db9fc
export F/E & Load-Generator port services
YANG-DB May 8, 2023
9629fb7
Merge pull request #2 from open-telemetry/main
YANG-DB May 8, 2023
ba709f1
fix jaeger service name
YANG-DB May 9, 2023
daedfab
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
d58ed46
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
a8e3f5d
Merge pull request #3 from open-telemetry/main
YANG-DB May 15, 2023
b6a018a
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
6031c17
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 15, 2023
92240ba
adding datasource for query prometheus
YANG-DB May 15, 2023
12d52cb
adding architecture.md including images
YANG-DB May 15, 2023
85fefce
add images and service links
YANG-DB May 16, 2023
73e2680
add jaeger-agent container name
YANG-DB May 16, 2023
f6067c6
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
24d278c
fix auth issues for data-prepper
YANG-DB May 16, 2023
7410478
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
d8a2abf
Merge pull request #4 from YANG-DB/otel-opensearch-data-prep
YANG-DB May 16, 2023
fe655cc
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
0be11cd
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
f54a011
add curl to the basic docker O/S
YANG-DB May 3, 2023
90c9a61
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
379372a
[shippingservice] update rust version and dependencies (#865)
julianocosta89 May 3, 2023
6ae5c80
[load generator] Bump loagen dependencies (#869)
julianocosta89 May 3, 2023
a69595a
[grafana] fix demo dashboard to be compatible with spanmetrics connec…
fatsheep9146 May 3, 2023
1c28220
export F/E & Load-Generator port services
YANG-DB May 8, 2023
42537be
[kafka] remove KRaft mode support workarounds (#880)
styblope May 8, 2023
8bd25ad
enabling batch span processor metrics for quoteservice (#878)
brettmc May 8, 2023
2cc7484
Generate random errors in cartservice (#824)
alanwest May 8, 2023
54e3b6f
fix jaeger service name
YANG-DB May 9, 2023
daf0d08
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
88e0171
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
d292741
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
6f55bd8
[currencyservice] Fix OTel C++ build and update OTel version (#886)
julianocosta89 May 12, 2023
193552f
adding datasource for query prometheus
YANG-DB May 15, 2023
febdfe1
adding architecture.md including images
YANG-DB May 15, 2023
904ed80
add images and service links
YANG-DB May 16, 2023
9cf4326
add jaeger-agent container name
YANG-DB May 16, 2023
c14aa11
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
a55d74f
fix auth issues for data-prepper
YANG-DB May 16, 2023
6032e3e
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
5954bdf
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 18, 2023
4d1d72e
add assets manager flast app for loading the integration assets
YANG-DB May 18, 2023
91f7a0e
remove experimental assets mgr app
YANG-DB May 18, 2023
78b38e6
Opensearch otel demo observability tutorial (#5)
YANG-DB May 23, 2023
fe8a551
Merge pull request #2 from open-telemetry/main
YANG-DB May 26, 2023
b422bc7
Update local-config.md
YANG-DB May 26, 2023
4431d7b
Update README.md
YANG-DB May 26, 2023
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
Prev Previous commit
Next Next commit
adding datasource for query prometheus
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed May 18, 2023
commit 193552f5d1f5ce53decb4f682db6d2dd6e0e106d
3 changes: 3 additions & 0 deletions add_hosts_locally.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

#!/bin/bash
# Local host that are used to help developing and debugging the OTEL demo locally

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ services:
volumes:
- opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
healthcheck:
test: ["CMD", "curl", "-f", "https://opensearch-node1:9200/_cluster/health?wait_for_status=yellow"]
test: ["CMD", "curl", "-f", "https://opensearch-node1:9200/_cluster/health?wait_for_status=yellow", "-ku admin:admin"]
interval: 5s
timeout: 25s
retries: 4
Expand Down Expand Up @@ -745,7 +745,7 @@ services:

# OpenSearch store - dashboard
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
image: opensearchproject/opensearch-dashboards:2.6.0 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
container_name: opensearch-dashboards
ports:
- 5601:5601 # Map host port 5601 to container port 5601
Expand Down
33 changes: 33 additions & 0 deletions local-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Local Dev Config

Use the following configuration to locally run and test the OTEL demo:

- For additional help go [here](https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/)

### Raise your host's ulimits:
Rais the upper liits for OpenSearch to be able handling high I/O :

`sudo sysctl -w vm.max_map_count=512000`

### Map domain name to local dns

run the [following script](add_hosts_locally.sh) to map the docker-compose service names to your local dns

```text
# The hostname you want to associate with the IP address

OPENSEARCH_HOST="opensearch-node1"
OPENSEARCH_DASHBOARD="opensearch-dashboards"
OTEL_STORE="frontend"
OTEL_LOADER="loadgenerator"
PROMETHEUS="prometheus"

# Add the entry to the /etc/hosts file

echo "$IP $OPENSEARCH_HOST" | sudo tee -a /etc/hosts
echo "$IP $OPENSEARCH_DASHBOARD" | sudo tee -a /etc/hosts
echo "$IP $OTEL_STORE" | sudo tee -a /etc/hosts
echo "$IP $PROMETHEUS" | sudo tee -a /etc/hosts
echo "$IP $OTEL_LOADER" | sudo tee -a /etc/hosts

```
58 changes: 40 additions & 18 deletions src/integrations/src/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,25 @@ def create_mapping_templates(client):
except OpenSearchException as e:
logger.error(f'Failed to create index template: {template_name}, error: {str(e)}')

# create data streams
def create_data_streams():
with open('../indices/data-stream.json', 'r') as f:
data = json.load(f)
data_streams = data.get('data-stream', [])

for ds in data_streams:
try:
response = requests.put(
url=f'https://{opensearch_host}:9200/_data_stream/{ds}',
auth=HTTPBasicAuth('admin', 'admin'),
headers={'Content-Type': 'application/json'},
verify=False # Disable SSL verification
)
response.raise_for_status() # Raise an exception if the request failed
logger.info(f'Successfully created data stream: {ds}')
except requests.HTTPError as e:
logger.error(f'Failed to create data stream: {ds}, error: {str(e)}')

# load dashboards in the display folder
def load_dashboards():
dashboard_dir = '../display/'
Expand All @@ -122,23 +141,26 @@ def load_dashboards():
logger.error(f'Failed to load dashboard: {dashboard_name}, error: {str(e)}')

# create the data_streams based on the list given in the data-stream.json file
def create_data_streams():
with open('../indices/data-stream.json', 'r') as f:
data = json.load(f)
data_streams = data.get('data-stream', [])

for ds in data_streams:
try:
response = requests.post(
url=f'https://{opensearch_host}:9200/_query/_datasources',
auth=HTTPBasicAuth('admin', 'admin'),
headers={'Content-Type': 'application/json'},
verify=False # Disable SSL verification
)
response.raise_for_status() # Raise an exception if the request failed
logger.info(f'Successfully created data stream: {ds}')
except requests.HTTPError as e:
logger.error(f'Failed to create data stream: {ds}, error: {str(e)}')
def create_datasources():
datasource_dir = '../datasource/'
for filename in os.listdir(datasource_dir):
if filename.endswith('.json'):
with open(os.path.join(datasource_dir, filename), 'r') as f:
datasource = json.load(f)
try:
response = requests.post(
url=f'https://{opensearch_host}:9200/_plugins/_query/_datasources',
auth=HTTPBasicAuth('admin', 'admin'),
json=datasource,
verify=False, # Disable SSL verification
headers={'Content-Type': 'application/json'}
)
response.raise_for_status() # Raise an exception if the request failed
logger.info(f'Successfully created datasource: {filename}')
print(f'Successfully created datasource: {filename}')
except requests.HTTPError as e:
print(f'Failed to create datasource: {filename}, error: {str(e)}')
logger.error(f'Failed to create datasource: {filename}, error: {str(e)}')


if __name__ == '__main__':
Expand All @@ -148,4 +170,4 @@ def create_data_streams():
create_mapping_templates(client)
create_data_streams()
load_dashboards()
create_data_streams()
create_datasources()