-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added rabbitmq to the auto discovery mechanism
- Loading branch information
Showing
9 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
cmd/otelcol/config/collector/config.d.linux/receivers/rabbitmq.discovery.yaml
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 @@ | ||
##################################################################################### | ||
# 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. # | ||
##################################################################################### | ||
# rabbitmq: | ||
# enabled: true | ||
# rule: | ||
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)rabbitmq.*"}) and not (command matches "splunk.discovery") | ||
# host_observer: type == "hostport" and command matches "(?i)rabbitmq.*" and not (command matches "splunk.discovery") | ||
# k8s_observer: type == "port" and pod.name matches "(?i)rabbitmq.*" | ||
# config: | ||
# default: | ||
# endpoint: '`endpoint`' | ||
# username: splunk.discovery.default | ||
# password: splunk.discovery.default | ||
# collection_interval: 10s | ||
# status: | ||
# metrics: | ||
# - status: successful | ||
# strict: rabbitmq.consumer.count | ||
# message: rabbitmq receiver is working! | ||
# statements: | ||
# - status: failed | ||
# regexp: 'connect: network is unreachable' | ||
# message: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
# - status: failed | ||
# regexp: 'connect: connection refused' | ||
# message: The container is refusing kafka server connections. |
28 changes: 28 additions & 0 deletions
28
internal/confmapprovider/discovery/bundle/bundle.d/receivers/rabbitmq.discovery.yaml
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,28 @@ | ||
##################################################################################### | ||
# Do not edit manually! # | ||
# All changes must be made to associated .tmpl file before running 'make bundle.d'. # | ||
##################################################################################### | ||
rabbitmq: | ||
enabled: true | ||
rule: | ||
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)rabbitmq.*"}) and not (command matches "splunk.discovery") | ||
host_observer: type == "hostport" and command matches "(?i)rabbitmq.*" and not (command matches "splunk.discovery") | ||
k8s_observer: type == "port" and pod.name matches "(?i)rabbitmq.*" | ||
config: | ||
default: | ||
endpoint: '`endpoint`' | ||
username: splunk.discovery.default | ||
password: splunk.discovery.default | ||
collection_interval: 10s | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: rabbitmq.consumer.count | ||
message: rabbitmq receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: 'connect: network is unreachable' | ||
message: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
- status: failed | ||
regexp: 'connect: connection refused' | ||
message: The container is refusing kafka server connections. |
24 changes: 24 additions & 0 deletions
24
internal/confmapprovider/discovery/bundle/bundle.d/receivers/rabbitmq.discovery.yaml.tmpl
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,24 @@ | ||
{{ receiver "rabbitmq" }}: | ||
enabled: true | ||
rule: | ||
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)rabbitmq.*"}) and not (command matches "splunk.discovery") | ||
host_observer: type == "hostport" and command matches "(?i)rabbitmq.*" and not (command matches "splunk.discovery") | ||
k8s_observer: type == "port" and pod.name matches "(?i)rabbitmq.*" | ||
config: | ||
default: | ||
endpoint: '`endpoint`' | ||
username: {{ defaultValue }} | ||
password: {{ defaultValue }} | ||
collection_interval: 10s | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: rabbitmq.consumer.count | ||
message: rabbitmq receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: 'connect: network is unreachable' | ||
message: The container cannot be reached by the Collector. Make sure they're in the same network. | ||
- status: failed | ||
regexp: 'connect: connection refused' | ||
message: The container is refusing kafka server connections. |
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
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
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
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
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
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