Application Monitoring On Prometheus Operator Setup

159 views
Skip to first unread message

bkaart...@gmail.com

unread,
Nov 21, 2017, 4:43:50 AM11/21/17
to Prometheus Users
Hi,

I am doing a POC in setting up Prometheus monitoring for Kubernetes. I have implemented Prometheus using Prometheus-Operator in KOPS setup.
I have completed implementation until where I could monitor Cluster level metrics using Kube-State-Metrics.

Now I got stuck at a place where I need to monitor application metrics like Nginx, Tomcat, Mysql, Redis, PHP, Apache etc..
I did an analysis online and found there are several ways on doing it.

One is to instrument application code using prom clients which is not possible in my organisation.
Another would be to expose application to /metrics endpoint and use exporters.

Now I am not sure how to expose application to /metrics end point and how to use exporters accordingly. Please help me.
I would be grateful.

Regards,
Kaarthik

Conor Broderick

unread,
Nov 21, 2017, 5:33:28 AM11/21/17
to bkaart...@gmail.com, Prometheus Users
Hi,

The general setup for exporting metrics from a non-instrumented application would be to setup its corresponding exporter near to it, ensure the exporter can export metrics from said application and then configure Prometheus to scrape the exporter.
In the cases where you're not directly instrumenting code the /metrics endpoint is on the exporter that exports metrics from the application, not the actual application itself.

If you want to monitor your own applications, PHP in this case, you would have to directly instrument your code with a PHP Prometheus client library.
A list of client libraries can be found here.

These blogposts contain examples which should help you:

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/55e0e8c2-5c4a-4880-8c4d-26c4cda194c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages