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 are available.
It takes few seconds for tyk_pump to connect to prometheus and shows on the page http : // localhost:9090/targets that the tyk job is up.
I’m using tyk_pump on docker that’s why the hostname is tyk_pump.