Hi,
I deploy the Tyk Pump in pod in k8s and use the Prometheus to scrape it. When I redeploy the Pump, all the previous data are lost.
For example, I send one request and the Prometheus records there is one request. Then I redeploy the Pump and send one request. The Prometheus shows there is still one request instead of two. Is there a way to keep the data?
Here’s my config:
{
"analytics_storage_type": "redis",
"analytics_storage_config": {
"type": "redis",
"host": "redis",
"port": 6379,
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 2000,
"optimisation_max_active": 4000
},
"purge_delay": 2,
"pumps": {
"prometheus": {
"type": "prometheus",
"meta": {
"listen_address": ":8084",
"path": "/metrics",
"track_all_paths": true,
"custom_metrics":[
{
"name":"proxy_http_requests_per_path",
"description":"Total of API requests per path",
"metric_type":"counter",
"labels":["response_code","api_name","method","path"]
},
{
"name":"proxy_http_requests_per_user",
"description":"Total of API requests per user",
"metric_type":"counter",
"labels":["response_code","api_name","method","path","alias"]
},
{
"name":"proxy_http_latency",
"description":"Latency of API requests",
"metric_type":"histogram",
"labels":["type","response_code","api_name","method","path"]
}
]
}
}
},
"dont_purge_uptime_data": true,
"statsd_connection_string": "graphite:8125"
}