Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
greatestusername committed Oct 23, 2023
2 parents e1e54a2 + ebc01b4 commit 00551dd
Show file tree
Hide file tree
Showing 12 changed files with 513 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#####################################################################################
# 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. #
#####################################################################################
# smartagent/collectd/kafka_broker:
# enabled: true
# rule:
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-broker"}) and not (command matches "splunk.discovery")
# host_observer: type == "hostport" and command matches "(?i)kafka-broker"
# k8s_observer: type == "port" and pod.name matches "(?i)kafka-broker"
# config:
# default:
# type: collectd/kafka
# host: '`host`'
# port: 7099
# clusterName: testCluster
# extraMetrics: ["*"]
# intervalSeconds: 1
# isolatedCollectd: true
# status:
# metrics:
# successful:
# - strict: counter.kafka-bytes-in
# first_only: true
# log_record:
# severity_text: info
# body: smartagent/collectd/kafka receiver is working!
# statements:
# failed:
# - regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
# first_only: true
# log_record:
# severity_text: info
# append_pattern: true
# body: The container is refusing kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#####################################################################################
# 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. #
#####################################################################################
# smartagent/collectd/kafka_consumer:
# enabled: true
# rule:
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-consumer"}) and not (command matches "splunk.discovery")
# host_observer: type == "hostport" and command matches "(?i)kafka-consumer"
# k8s_observer: type == "port" and pod.name matches "(?i)kafka-consumer"
# config:
# default:
# type: collectd/kafka_consumer
# host: '`host`'
# port: 9099
# extraMetrics: ["*"]
# intervalSeconds: 1
# isolatedCollectd: true
# status:
# metrics:
# successful:
# - strict: gauge.kafka.consumer.bytes-consumed-rate
# first_only: true
# log_record:
# severity_text: info
# body: smartagent/collectd/kafka_consumer receiver is working!
# statements:
# failed:
# - regexp: "kafka plugin: Failed to connect to Apache Kafka Consumer .* at server .* Can't connect to Kafka consumer on .* [(]111[)]"
# first_only: true
# log_record:
# severity_text: info
# append_pattern: true
# body: The container is refusing Kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#####################################################################################
# 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. #
#####################################################################################
# smartagent/collectd/kafka_producer:
# enabled: true
# rule:
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-producer"}) and not (command matches "splunk.discovery")
# host_observer: type == "hostport" and command matches "(?i)kafka-producer"
# k8s_observer: type == "port" and pod.name matches "(?i)kafka-producer"
# config:
# default:
# type: collectd/kafka_producer
# host: '`host`'
# port: 8099
# extraMetrics: ["*"]
# intervalSeconds: 1
# isolatedCollectd: true
# status:
# metrics:
# successful:
# - strict: gauge.kafka.producer.byte-rate
# first_only: true
# log_record:
# severity_text: info
# body: smartagent/collectd/kafka_producer receiver is working!
# statements:
# failed:
# - regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
# first_only: true
# log_record:
# severity_text: info
# append_pattern: true
# body: The container is refusing kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#####################################################################################
# Do not edit manually! #
# All changes must be made to associated .tmpl file before running 'make bundle.d'. #
#####################################################################################
smartagent/collectd/kafka_broker:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-broker"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-broker"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-broker"
config:
default:
type: collectd/kafka
host: '`host`'
port: 7099
clusterName: testCluster
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: counter.kafka-bytes-in
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{ receiver "smartagent/collectd/kafka_broker" }}:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-broker"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-broker"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-broker"
config:
default:
type: collectd/kafka
host: '`host`'
port: 7099
clusterName: testCluster
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: counter.kafka-bytes-in
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#####################################################################################
# Do not edit manually! #
# All changes must be made to associated .tmpl file before running 'make bundle.d'. #
#####################################################################################
smartagent/collectd/kafka_consumer:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-consumer"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-consumer"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-consumer"
config:
default:
type: collectd/kafka_consumer
host: '`host`'
port: 9099
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: gauge.kafka.consumer.bytes-consumed-rate
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka_consumer receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to Apache Kafka Consumer .* at server .* Can't connect to Kafka consumer on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing Kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ receiver "smartagent/collectd/kafka_consumer" }}:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-consumer"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-consumer"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-consumer"
config:
default:
type: collectd/kafka_consumer
host: '`host`'
port: 9099
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: gauge.kafka.consumer.bytes-consumed-rate
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka_consumer receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to Apache Kafka Consumer .* at server .* Can't connect to Kafka consumer on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing Kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#####################################################################################
# Do not edit manually! #
# All changes must be made to associated .tmpl file before running 'make bundle.d'. #
#####################################################################################
smartagent/collectd/kafka_producer:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-producer"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-producer"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-producer"
config:
default:
type: collectd/kafka_producer
host: '`host`'
port: 8099
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: gauge.kafka.producer.byte-rate
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka_producer receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing kafka connections.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ receiver "smartagent/collectd/kafka_producer" }}:
enabled: true
rule:
docker_observer: type == "container" and any([name, image, command], {# matches "(?i)kafka-producer"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and command matches "(?i)kafka-producer"
k8s_observer: type == "port" and pod.name matches "(?i)kafka-producer"
config:
default:
type: collectd/kafka_producer
host: '`host`'
port: 8099
extraMetrics: ["*"]
intervalSeconds: 1
isolatedCollectd: true
status:
metrics:
successful:
- strict: gauge.kafka.producer.byte-rate
first_only: true
log_record:
severity_text: info
body: smartagent/collectd/kafka_producer receiver is working!
statements:
failed:
- regexp: "kafka plugin: Failed to connect to database .* at server .* Can't connect to kafka server on .* [(]111[)]"
first_only: true
log_record:
severity_text: info
append_pattern: true
body: The container is refusing kafka connections.
9 changes: 9 additions & 0 deletions internal/confmapprovider/discovery/bundle/bundle_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl
//go:generate discoverybundler -r -t bundle.d/receivers/oracledb.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/oracledb.discovery.yaml.tmpl
<<<<<<< HEAD
//go:generate discoverybundler -r -t bundle.d/receivers/redis.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/redis.discovery.yaml.tmpl
=======
//go:generate discoverybundler -r -t bundle.d/receivers/smartagent-collectd-kafka-broker.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-kafka-broker.discovery.yaml.tmpl
//go:generate discoverybundler -r -t bundle.d/receivers/smartagent-collectd-kafka-producer.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-kafka-producer.discovery.yaml.tmpl
//go:generate discoverybundler -r -t bundle.d/receivers/smartagent-collectd-kafka-consumer.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-kafka-consumer.discovery.yaml.tmpl
>>>>>>> ebc01b422b257105d66cb6b6a3010a2e063c15ee

//go:generate discoverybundler -r -t bundle.d/extensions/docker-observer.discovery.yaml.tmpl
//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/extensions -t bundle.d/extensions/docker-observer.discovery.yaml.tmpl
Expand Down
Loading

0 comments on commit 00551dd

Please sign in to comment.