Olu
February 7, 2024, 12:19pm
3
I don’t see anything wrong with your config.
Could you try exposing a different port for pump and using that as the listen address?
Managed to expose the tyk metrics with the following configuration.
Defined a new job for tyk in prometheus.yml:
job_name: ‘tyk’
static_configs:
targets: [‘tyk_pump:9191’]
Added the prometheus configuration to the pump.conf:
“prometheus”: {
“type”: “prometheus”,
“meta”: {
“listen_address”: “:9191”,
“path”: “/metrics”
}
}
The prometheus targets page (http : // localhost:9090/targets) shows the tyk target running on http : // tyk_pump:9191/metrics and the tyk counters / histograms …
In my case, I used 8091
time="Feb 07 12:11:42" level=info msg="Starting prometheus listener on::8091" prefix=prometheus-pump
Then make your requests and check the metrics ...8091/metrics
endpoint to confirm if you can see the missing metrics. If you can then configure your scrape settings on Prometheus. (this is how I have set mine)
Let us know how it goes.