Skip to content

Commit

Permalink
Enable redis discovery (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax authored Oct 7, 2020
1 parent afbcc4b commit f79047e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helm-charts/o11y-collector/templates/config/_otel-agent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ receivers:
config:
metrics_path: '`"prometheus.io/path" in annotations ? annotations["prometheus.io/path"] : "/metrics"`'
endpoint: '`endpoint`:`"prometheus.io/port" in annotations ? annotations["prometheus.io/port"] : 9090`'
# Redis discovery enabled by default.
# "service_name" pod label is used as service.name attribute attached the metrics,
# pod name used as fallback if the label is not set.
# Password has to be specified if redis pods have auth layer enabled.
# The discovery can be disabled by setting agent.config.receivers.receiver_creator.redis to null.
redis:
rule: type.port && port == 6379
config:
service_name: '`"service_name" in pod.labels ? pod.labels["service_name"] : pod.name`'
collection_interval: 10s
# password: <password>

kubeletstats:
collection_interval: 10s
auth_type: serviceAccount
Expand Down

0 comments on commit f79047e

Please sign in to comment.