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

Splunkenterprisereceiver add health metric (#36695) #36695

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

macolby42
Copy link

@macolby42 macolby42 commented Dec 5, 2024

Description

Adds splunk.health metric that uses the introspection endpoint at /services/server/health/splunkd/details. The metric features 2 attributes:

splunk.feature: Describes the part of the server's feature
splunk.feature.health: Describes (in red, yellow, green) the health status of the given feature

The metric will remain a value of 1 unless the feature's health becomes 'red.'

Testing

Built a custom version of splunk-otel-collector that referenced this code. Then ran it on a Splunk stack, and received metrics out. Also created generated tests.

Documentation

Added an entry to documentation.md describing the new metric.

macolby42 and others added 2 commits December 5, 2024 12:05
* Initial commit

* Corrected structs to fit json API response

* Added to changelog

* PR number added to changelog
@atoulme
Copy link
Contributor

atoulme commented Dec 6, 2024

Build fails with

Generated code is out of date, please run "make generate" and commit the changes in this PR.

@macolby42 macolby42 changed the title Splunkenterprisereceiver add health metric (#1) Splunkenterprisereceiver add health metric (#36695) Dec 9, 2024
| Name | Description | Values |
| ---- | ----------- | ------ |
| splunk.feature | The Feature name from the Splunk Health Introspection Endpoint | Any Str |
| splunk.feature.health | The Health (in color form) of a Splunk Feature from the Splunk Health Introspection Endpoint | Any Str |
Copy link
Contributor

Choose a reason for hiding this comment

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

sure you need that? you already get the status via the value right?

Copy link
Author

Choose a reason for hiding this comment

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

The value only indicates whether it is red or not. A value of 1 could be green or yellow. It's not ideal, but color system for splunkd what implemented long before our use of OTel.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 24, 2024
@github-actions github-actions bot removed the Stale label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants