-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will be used to collect data on the POS, and export to our main collector.
- Loading branch information
0 parents
commit 9e8a2bd
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# VoriPOS OpenTelemetry Collector | ||
|
||
This repository contains an OpenTelemetry Collector configured for VoriPOS. | ||
|
||
## Installation | ||
This service is distributed via Homebrew. | ||
|
||
```shell | ||
brew tap voriteam/voripos | ||
brew install voripos-otel-collector | ||
brew services start voripos-otel-collector | ||
``` | ||
|
||
## Distribution | ||
1. Update `VORIPOS_OTEL_COLLECTOR_VERSION`. | ||
2. Create a release on GitHub. | ||
3. Follow the instructions at https://github.com/voriteam/homebrew-voripos to update the tap with the latest version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
extensions: | ||
basicauth/client: | ||
client_auth: | ||
username: "${env:OTLP_USERNAME}" | ||
password: "${env:OTLP_PASSWORD}" | ||
|
||
receivers: | ||
otlp: | ||
protocols: | ||
http: | ||
grpc: | ||
|
||
processors: | ||
batch: | ||
attributes: | ||
actions: | ||
- key: voripos_otel_collector_version | ||
value: "${env:VORIPOS_OTEL_COLLECTOR_VERSION}" | ||
action: upsert | ||
- key: provisioned_environment | ||
value: "${env:VORIPOS_ENVIRONMENT}" | ||
action: upsert | ||
- key: bannerID | ||
value: "${env:VORIPOS_BANNER_ID}" | ||
action: upsert | ||
- key: bannerName | ||
value: "${env:VORIPOS_BANNER_NAME}" | ||
action: upsert | ||
- key: storeID | ||
value: "${env:VORIPOS_STORE_ID}" | ||
action: upsert | ||
- key: storeName | ||
value: "${env:VORIPOS_STORE_NAME}" | ||
action: upsert | ||
- key: laneID | ||
value: "${env:VORIPOS_LANE_ID}" | ||
action: upsert | ||
- key: laneName | ||
value: "${env:VORIPOS_LANE_NAME}" | ||
action: upsert | ||
memory_limiter: | ||
check_interval: 5s | ||
limit_mib: 500 | ||
spike_limit_mib: 200 | ||
|
||
exporters: | ||
debug: | ||
verbosity: detailed | ||
otlp: | ||
endpoint: "${env:OTLP_HOSTNAME}:${env:OTLP_PORT}" | ||
auth: | ||
authenticator: basicauth/client | ||
|
||
service: | ||
extensions: [basicauth/client] | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [memory_limiter,attributes,batch] | ||
exporters: [debug, otlp] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [memory_limiter,attributes,batch] | ||
exporters: [debug, otlp] | ||
logs: | ||
receivers: [otlp] | ||
processors: [memory_limiter,attributes,batch] | ||
exporters: [debug, otlp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is needed to locate the otelcol-contrib executable | ||
export PATH="/opt/homebrew/bin:$PATH" | ||
|
||
OTLP_HOSTNAME=$(defaults read com.vori.VoriPOS provisioned_otlpHostname) | ||
OTLP_PORT=$(defaults read com.vori.VoriPOS provisioned_otlpPort) | ||
OTLP_USERNAME=$(defaults read com.vori.VoriPOS provisioned_otlpUsername) | ||
OTLP_PASSWORD=$(defaults read com.vori.VoriPOS provisioned_otlpPassword) | ||
VORIPOS_ENVIRONMENT=$(defaults read com.vori.VoriPOS provisioned_environment) | ||
VORIPOS_BANNER_ID=$(defaults read com.vori.VoriPOS provisioned_bannerID) | ||
VORIPOS_BANNER_NAME=$(defaults read com.vori.VoriPOS provisioned_bannerName) | ||
VORIPOS_STORE_ID=$(defaults read com.vori.VoriPOS provisioned_storeID) | ||
VORIPOS_STORE_NAME=$(defaults read com.vori.VoriPOS provisioned_storeName) | ||
VORIPOS_LANE_ID=$(defaults read com.vori.VoriPOS provisioned_laneID) | ||
VORIPOS_LANE_NAME=$(defaults read com.vori.VoriPOS provisioned_laneName) | ||
|
||
export OTLP_HOSTNAME | ||
export OTLP_PORT | ||
export OTLP_USERNAME | ||
export OTLP_PASSWORD | ||
export VORIPOS_ENVIRONMENT | ||
export VORIPOS_BANNER_ID | ||
export VORIPOS_BANNER_NAME | ||
export VORIPOS_STORE_ID | ||
export VORIPOS_STORE_NAME | ||
export VORIPOS_LANE_ID | ||
export VORIPOS_LANE_NAME | ||
export VORIPOS_OTEL_COLLECTOR_VERSION=0.1.0 | ||
|
||
echo "Data will be exported to ${OTLP_HOSTNAME}:${OTLP_PORT}" | ||
otelcol-contrib --config=file:$( dirname -- "$0"; )/config.yml |