Is there some option to configure metricbeat for collecting nginx-ingress metrics/stats installed on k8s. AFAIK nginx module just parses stub_status response. Nginx can ship metrics in prometheus format or in json.
I can't upload here json example.
The nginx module only implement stub_status metricset. Prometheus and json (via http) are more generic protocols. Have you had a look at the http or prometheus module?
Thanks. Didn't know about that.
For those who questoned:
- module: http
- module: prometheus
nginx should be run with
--set controller.stats.enabled=true \
Thank you for posting your solution with sample configs!
do you have only one nginx instance running?
I think the http / promethues collector needs an endpoint for each nginx instance.
Or can metricbeat discover te endpoints?
I have one pod of nginx-controller, but as you said there is endpoint for nginx-controller (stats and metrics too) and it points to all nginx-controller pods. So all you need is to place metricbeat in the same namespace as nginx or create your own service in metricbeat namespace. But i don't know how metrics is collected from multiple instance of nginx-controller pods.
thx for the info, so then the easy way is to run the metricbeat in each nginx pod.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.