Hi,I am new to Prometheus which I want to integrate with my Python Django application. I have gone through the docs of Prometheus and its python client. I cannotfigure out two things: 1. I did not find any PushGateway in python by which I can push the metrics
and 2. what changes do I need to do in configuration file of Prometheusso that I can see and monitor the metrics in Prometheus dashboard. If anyone has any suggestion regrading that, I will be really grateful.Thanking you,Abhishek
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49 173 6395215
Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657BHi,I have gone through https://github.com/prometheus/client_python/blob/master/prometheus_client/__init__.py#L429 and http://prometheus.io/docs/introduction/getting_started/#configuring-prometheus-to-monitor-the-sample-targets. In this context, two things are not getting clear to me:From this what I have understood is that, the metrics those I want to monitor, I have to register them by CollectorRegistry().register() , but I cannot figureout how to register a metrics.
Prometheus is already running on port 9090 which I have already set up locally. So if possible, could you please one small example in python regarding how to add such a metric to that server. If I am wrong, please rectify.
Another thing is, a Django server is running on my local on port 80. So I have modified the prometheus.conf file by adding one target as http://localhost:80/metrics thinking that Prometheus server will pull the data from my Django app. But while restarting the server again modifying those changes I am seeing 404 error for the target though my django app is still running on port 80 in my local. What mistakes I am doing, I cannot understand.
Thanking you,Abhishek
On Thursday, 19 March 2015 16:22:03 UTC+5:30, joy wrote:Hi,I am new to Prometheus which I want to integrate with my Python Django application. I have gone through the docs of Prometheus and its python client. I cannotfigure out two things: 1. I did not find any PushGateway in python by which I can push the metrics and 2. what changes do I need to do in configuration file of Prometheusso that I can see and monitor the metrics in Prometheus dashboard. If anyone has any suggestion regrading that, I will be really grateful.Thanking you,Abhishek
--
Hi,I have done following:implemented one API like that and added corresponding url in URLConf:def metrics(request):from prometheus_client import generate_latest, Counter
d = Counter('my_failures_total', 'Description of counter')
return HttpResponse(generate_latest(), mimetype='application/json')
and modified the target in prometheus.conf like following:Now while restarting the prometheus server and checking the metrics in localhost:9090/graphs, I cannot see the counter my_failures_total, and it is showing nodatapoints found with that name and one error is coming in status like Unrecognized API version. I cannot understand what mistakes I am doing here.Thanking you,Abhishek
On Thursday, 19 March 2015 16:22:03 UTC+5:30, joy wrote:Hi,I am new to Prometheus which I want to integrate with my Python Django application. I have gone through the docs of Prometheus and its python client. I cannotfigure out two things: 1. I did not find any PushGateway in python by which I can push the metrics and 2. what changes do I need to do in configuration file of Prometheusso that I can see and monitor the metrics in Prometheus dashboard. If anyone has any suggestion regrading that, I will be really grateful.Thanking you,Abhishek
--
--