-
Notifications
You must be signed in to change notification settings - Fork 166
Bring Kafkamatrics receiver into the discovery mode #4903
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
cmd/otelcol/config/collector/config.d.linux/receivers/kafkametrics.discovery.yaml
This file contains hidden or 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,36 @@ | ||
##################################################################################### | ||
# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # | ||
# # | ||
# It reflects the default configuration bundled in the Collector executable for use # | ||
# in discovery mode (--discovery) and is provided for reference or customization. # | ||
# Please note that any changes made to this file will need to be reconciled during # | ||
# upgrades of the Collector. # | ||
##################################################################################### | ||
# kafkametrics: | ||
# enabled: true | ||
# rule: | ||
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka.*"}) and not (command matches "splunk.discovery") | ||
# host_observer: type == "hostport" and command matches "(?i)kafka.*" and not (command matches "splunk.discovery") | ||
# k8s_observer: type == "port" and pod.name matches "(?i)kafka.*" | ||
# config: | ||
# default: | ||
# protocol_version: 2.0.0 | ||
# scrapers: | ||
# - brokers | ||
# - topics | ||
# - consumers | ||
# status: | ||
# metrics: | ||
# - status: successful | ||
# strict: kafka.brokers | ||
# log_record: | ||
# body: kafkametrics receiver is working! | ||
# statements: | ||
# - status: failed | ||
# regexp: 'connect: network is unreachable' | ||
# log_record: | ||
# body: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
# - status: failed | ||
# regexp: 'connect: connection refused' | ||
# log_record: | ||
# body: The container is refusing kafka server connections. |
32 changes: 32 additions & 0 deletions
32
internal/confmapprovider/discovery/bundle/bundle.d/receivers/kafkametrics.discovery.yaml
This file contains hidden or 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 @@ | ||
##################################################################################### | ||
# Do not edit manually! # | ||
# All changes must be made to associated .tmpl file before running 'make bundle.d'. # | ||
##################################################################################### | ||
kafkametrics: | ||
enabled: true | ||
rule: | ||
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka.*"}) and not (command matches "splunk.discovery") | ||
host_observer: type == "hostport" and command matches "(?i)kafka.*" and not (command matches "splunk.discovery") | ||
k8s_observer: type == "port" and pod.name matches "(?i)kafka.*" | ||
config: | ||
default: | ||
protocol_version: 2.0.0 | ||
scrapers: | ||
- brokers | ||
- topics | ||
- consumers | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: kafka.brokers | ||
log_record: | ||
body: kafkametrics receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: 'connect: network is unreachable' | ||
log_record: | ||
body: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
- status: failed | ||
regexp: 'connect: connection refused' | ||
log_record: | ||
body: The container is refusing kafka server connections. |
28 changes: 28 additions & 0 deletions
28
...rnal/confmapprovider/discovery/bundle/bundle.d/receivers/kafkametrics.discovery.yaml.tmpl
This file contains hidden or 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,28 @@ | ||
{{ receiver "kafkametrics" }}: | ||
enabled: true | ||
rule: | ||
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka.*"}) and not (command matches "splunk.discovery") | ||
host_observer: type == "hostport" and command matches "(?i)kafka.*" and not (command matches "splunk.discovery") | ||
k8s_observer: type == "port" and pod.name matches "(?i)kafka.*" | ||
config: | ||
default: | ||
protocol_version: 2.0.0 | ||
scrapers: | ||
- brokers | ||
- topics | ||
- consumers | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: kafka.brokers | ||
log_record: | ||
body: kafkametrics receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: 'connect: network is unreachable' | ||
log_record: | ||
body: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
- status: failed | ||
regexp: 'connect: connection refused' | ||
log_record: | ||
body: The container is refusing kafka server connections. |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.