Adding nginx-prometheus-exporter as a sidecar in nginx-ingress helm chart. #4495
Replies: 10 comments
-
Hi @jcholowaty thanks for reporting! Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂 Cheers! |
Beta Was this translation helpful? Give feedback.
-
The prometheus exporter is built-in to the ingress controller (from this project) you don't need to use the exporter as a sidecar. |
Beta Was this translation helpful? Give feedback.
-
@brianehlert Hi! thanks for your reply! I supose that but i can't figure out how scrape the metrics... I have enable this:
I don't see the port 9113 available or how can i scrape from prometheus? |
Beta Was this translation helpful? Give feedback.
-
@jcholowaty have you followed this docs https://docs.nginx.com/nginx-ingress-controller/logging-and-monitoring/prometheus/ ? a list of exposed metrics: https://github.com/nginxinc/nginx-prometheus-exporter#exported-metrics Note: you need to configure NIC (at this step - https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/#4-deploying-nginx-ingress-controller) to allow Prometheus metrics before starting a new NGINX Ingress Controller. To configure NIC follow the first link in this comment. kubernetes-ingress/deployments/deployment/nginx-plus-ingress.yaml Lines 16 to 19 in bdb9d7f |
Beta Was this translation helpful? Give feedback.
-
@jjngx Hi! Yes!! maybe i'm doing something wrong and i don't see it. in the values.yaml is all enable and i'm trying to config the scrape config like this:
That ip is the ClusterIP but i tried with the External IP too. And this with the external ip
|
Beta Was this translation helpful? Give feedback.
-
First of all, we would never want to expose your Prometheus exporter through an external load balancer. Even one you have restricted. The potential for exposure is too great. Each NIC pod in the NIC service will expose the exporter on the port 9113 by default. I am assuming you have uncommented all of these from your values file and deployed or updated. Commonly, customers have a Prometheus agent installed in the cluster and it (very magically) discovers new exporters and begins collecting. |
Beta Was this translation helpful? Give feedback.
-
Em sex., 14 de jul. de 2023 às 17:24, Brian Ehlert ***@***.***>
escreveu:
… First of all, we would never want to expose your Prometheus exporter
through an external load balancer. Even one you have restricted. The
potential for exposure is too great.
Each NIC pod in the NIC service will expose the exporter on the port 9113
by default.
So you don't scrape the service, you scrape the individual pods.
I am assuming you have uncommented all of these from your values file and
deployed or updated.
*https://docs.nginx.com/nginx-ingress-controller/configurariam
/global-configuration/command-line-arguments/#-enable-prometheus-metrics*
Commonly, customers have a Prometheus agent installed in the cluster and
it (very magically) discovers new exporters and begins collecting.
https://prometheus.io/blog/2021/11/16/agent/
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are
[image: Documento do Google]
Dicas para embarque
<https://docs.google.com/document/d/1-EmLgkCtMoZEW7wHZ_HbGllw8gVBOXH_0G7cqkdWhQA/edit>
receiving this because you are subscribed to this thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi! @brianehlert yes! i have uncommented tha principals values. I share my values.yaml
Even this i have not seen the port and i can't scrape it in prometheus. I'm using the kube-prometheus-stack. |
Beta Was this translation helpful? Give feedback.
-
@brianehlert and this is the pod's yaml.
|
Beta Was this translation helpful? Give feedback.
-
@jcholowaty have you verified that you can access the prometheus endpoint ( kubectl port-forward -n nginx-ingress <nginx-ingress-pod-id> 9113:9113 Then open a web browser on |
Beta Was this translation helpful? Give feedback.
-
Hi! i'm using the NGINX Ingress Controller helm chart v0.18.0 in GKE and trying to add a sidecar the nginx-prometheus-exporter v0.11.0 but the that container fail.
In the args i configured the svc of the nginx-ingress deploy and in the first place the :8080/stub_status and 9113/metrics but nothing works.
How can I make the exporter work? Thanks a lot for your help!!
Beta Was this translation helpful? Give feedback.
All reactions