Unable to access plack middleware ( Plack::Middleware::Prometheus::RequestTimes )
Hey yinz, I’m trying to add some Prometheus metrics to Koha. This looks like it has what we want: https://metacpan.org/pod/Plack::Middleware::Prometheus::RequestTimes Really, I’d like response times per script, but I’m not that picky just yet. I tried this on /etc/koha/plack.psgi but I just get a 404 for 127.0.0.1:8081/metrics. No errors in the logs. Any thoughts? Here's my POC commit: https://github.com/bywatersolutions/bywater-koha-devel/commit/472436f7a05a8a... --- http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org )
That’s cool. I’ve been wanting to integrate with Prometheus for years but never had the time. In this case, did you remember to add a ProxyPass in /etc/koha/apache-shared-intranet-plack.conf for the /metrics path? David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Kyle Hall Sent: Wednesday, 31 May 2023 2:37 AM To: Koha Devel <koha-devel@lists.koha-community.org> Subject: [Koha-devel] Unable to access plack middleware ( Plack::Middleware::Prometheus::RequestTimes ) Hey yinz, I’m trying to add some Prometheus metrics to Koha. This looks like it has what we want: https://metacpan.org/pod/Plack::Middleware::Prometheus::RequestTimes Really, I’d like response times per script, but I’m not that picky just yet. I tried this on /etc/koha/plack.psgi but I just get a 404 for 127.0.0.1:8081/metrics <http://127.0.0.1:8081/metrics> . No errors in the logs. Any thoughts? Here's my POC commit: https://github.com/bywatersolutions/bywater-koha-devel/commit/472436f7a05a8a... --- http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org )
Hi Kyle, It should work if you mount it in /intranet/metrics and access it using /cgi-bin/koha/metrics Cheers, Jonathan Le mar. 30 mai 2023 à 18:36, Kyle Hall <kyle.m.hall@gmail.com> a écrit :
Hey yinz, I’m trying to add some Prometheus metrics to Koha. This looks like it has what we want: https://metacpan.org/pod/Plack::Middleware::Prometheus::RequestTimes
Really, I’d like response times per script, but I’m not that picky just yet.
I tried this on /etc/koha/plack.psgi but I just get a 404 for 127.0.0.1:8081/metrics. No errors in the logs. Any thoughts?
Here's my POC commit:
https://github.com/bywatersolutions/bywater-koha-devel/commit/472436f7a05a8a...
--- http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
participants (3)
-
David Cook -
Jonathan Druart -
Kyle Hall