-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Prometheus plugin #10928
Comments
@simoelmou will you please test pr #10932? |
@MyaLongmire
It seems the parameter monitor_kubernetes_pods_namespace is not used with the pr #10932 |
Hi @simoelmou, Can you check if you have permissions to get pods: If you get "no"... You might have to edit the ClusterRole for telegraf agent
|
Hi @shubrajp
Why do we need to retrieve pods at the cluster scope if monitor_kubernetes_pods_namespace is enabled ? it only needs to retrieve pods at the namespace scope. |
Ahh... Right... As to "retrieve pods at the cluster scope if monitor_kubernetes_pods_namespace is enabled" |
@simoelmou, |
@shubrajp
|
Hi @simoelmou, Can you please try this: Also can you share the ClusterRole file for telegraf? |
The service account telegraf has a role with [get list watch] verbs and pods as resources in the namespace not a ClusterRole. |
ah shoot I didn't see this back and forth before I merged do we still need to land additional fixes? or even revert the change? |
@simoelmou...
and
are conflicting 😅 I had a similar issue:
and
Adding |
@shubrajp
I don't understand why the PR should introduce permissions's error on the user's end if the user enabled the namespace configuration Can you please test the PR with Role instead of ClusterRole? I think you'll be able to reproduce the error from your end |
@simoelmou,
So, it has to list all the pods then filter things out based on Namespace, Label / Field Selectors. |
FYI
Any pod changes after 30 minutes weren't reported. |
Ah thanks for the link kubernetes-sigs/controller-runtime#124 it's unfortunate to have this limitation for non-admins but this is not related to telegraf. |
Thank you both for the back and forth. Is there any additional documentation that we should add to the plugin to aid others who may come across this? Thanks |
We can add links about informer and how it works. Justification for change in permissions: Rest of the functionality is same. |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.20.4, Openshift v3.11.570 ( kubernetes v1.11.0+d4cacc0)
Docker
No response
Steps to reproduce
Expected behavior
Actual behavior
2022-03-30T22:47:43Z E! [inputs.prometheus] Error in plugin: error making HTTP request to http://10.132.11.127:8080/actuator/prometheus: Get "http://10.132.11.127:8080/actuator/prometheus": dial tcp 10.132.11.127:8080: connect: no route to host
Additional info
No response
The text was updated successfully, but these errors were encountered: