Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry Receiver to Splunk Observability dashboard generator (Terraform configs) #54

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

greatestusername
Copy link
Contributor

@greatestusername greatestusername commented Dec 13, 2023

Python script for taking the metrics named in any given OpenTelemetry Receiver's metadata.yaml and create a dashboard for Splunk Observability with those metrics as a Terraform config. Saves time for users who need/want to use a contrib receiver but don't want to hunt down all the possible metrics and add them to a dashboard.

  • Included a folder of generated dashboards as well (observability-tf-configs)
  • otel-receiver-yaml directory contains current yaml files for receivers. Can also be pulled down by script.

NOTE: These dashboards are GENERATED and are NOT a replacement for Out Of The Box dashboard/content in Splunk Observability. This is also noted in the README.md.

@greatestusername-splunk
Copy link
Collaborator

recheck

@greatestusername-splunk greatestusername-splunk marked this pull request as ready for review January 30, 2024 14:25
@greatestusername
Copy link
Contributor Author

recheck

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
@greatestusername-splunk greatestusername-splunk changed the title DRAFT: Otel dashboard generator Otel dashboard generator Feb 5, 2024
@greatestusername-splunk greatestusername-splunk changed the title Otel dashboard generator OpenTelemetry Receiver to Splunk Observability dashboard generator Feb 5, 2024
@greatestusername-splunk greatestusername-splunk changed the title OpenTelemetry Receiver to Splunk Observability dashboard generator OpenTelemetry Receiver to Splunk Observability dashboard generator (Terraform configs) Feb 5, 2024
@splunk splunk unlocked this conversation Feb 5, 2024
@greatestusername
Copy link
Contributor Author

Generate dashboard for a single receiver

Install the requirements and run otel-dashboard-o11y.py with the --file_path option pointing the metadata.yaml file for the receiver you'd like to generate from.

Note: The Terraform configuration will print to STDOUT which can be piped to a .tf file.

pip3 install -r requirements.txt
python3 otel-dashboard-o11y.py --file_path ./metadata.yaml

Generate dashboards for many receivers

If the --file_path argument is not used the script will look in the local directory ./otel-receiver-yaml/ for available receiver metadata.yaml files with metrics sections. Generated Terraform configurations will be placed in the local directory ./observability-tf-configs.

pull-otel-yaml.py can be used to pull down all receiver configs with a metrics section and place them in the ./otel-receiver-yaml directory. To avoid api rate limiting during this process a Github PAT token can be provided with the environment variable $GITHUB_PAT_TOKEN.

pip3 install -r requirements.txt
python3 pull-otel-yaml.py                          
Metadata.yaml with 'metrics' section extracted from activedirectorydsreceiver
Metadata.yaml with 'metrics' section extracted from aerospikereceiver
...

Copy link
Collaborator

@billg-splunk billg-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@billg-splunk billg-splunk merged commit 319570b into splunk:main Mar 11, 2024
2 of 4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants