-
Notifications
You must be signed in to change notification settings - Fork 166
istio k8s discovery #5854
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
istio k8s discovery #5854
Conversation
0b8aeda
to
f331816
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with it other than wanting some more readme/guidance of these new .sh files
cmd/otelcol/config/collector/config.d.linux/receivers/istio.discovery.yaml
Outdated
Show resolved
Hide resolved
Converted to draft since I am working on fixes for the PR. The discovery config needs updates to work with istio-proxy, gateways and pilot. |
default: | ||
config: | ||
scrape_configs: | ||
- job_name: 'istio' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shows up as service.name
in the final metrics. Any feedback on a better name is welcome.
internal/confmapprovider/discovery/bundle/bundle.d/receivers/istio.discovery.yaml.tmpl
Outdated
Show resolved
Hide resolved
{{ receiver "prometheus/istio" }}: | ||
enabled: true | ||
rule: | ||
k8s_observer: type == "pod" and ("istio.io/rev" in annotations or labels["istio"] == "pilot" or name matches "istio.*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not checking for the std annotations["prometheus.io/scrape"] == "true"
. My thinking is that with discovery mode we are not expecting users to do the pre-work of adding these, but then on the other hand, this would be an easy way for users to opt-out certain pods.
This adds istio k8s discovery with a pod.container rule to connect to any istio container and extract metrics.