Dear Team,
I have been trying to configure the Prometheus pump using the Tyk helm chart by setting up the environment variables as instructed in the documentation available at Tyk Pump Environment Variables .
However, I have noticed that the TYK_PMP_PUMPS_PROMETHEUS_META_DISABLEDMETRICS
environment variable is not functioning as expected. We intended to disable some of the default metrics using this environment variable.
Upon examining the deployment pump chart available at https://github.com/TykTechnologies/tyk-charts/blob/main/tyk-pump/templates/deployment-pmp.yaml , I realized that there is no support for this environment variable. Hence, I would greatly appreciate your help in adding support for this feature.
Thank you for your assistance in this matter.
Hi Asha,
I have tried that but it doesn’t seem to be working. It is still creating default metrics.
e.g.:
- name: TYK_PMP_PUMPS_PROMETHEUS_META_DISABLEDMETRICS
value: ‘[“tyk_latency_bucket”]’
Note that I am using 1.7 version for tyk pump.
Sincerely,
Kaushal
Hi Asha,
Sorry for the delayed response. I did try disabling the base metrics but the metrics are still exposed.
Below is my configuration
- name: TYK_PMP_PUMPS_PROMETHEUS_META_DISABLEDMETRICS
value: '["tyk_latency", "tyk_http_status", "tyk_http_status_per_path", "tyk_http_status_per_key", "tyk_http_status_per_oauth_client"]'
Sincerely,
Kaushal
Olu
April 20, 2023, 9:50pm
6
Can you try inputting the value as a comma separated value instead. For example
tyk_latency, tyk_http_status, tyk_http_status_per_path, tyk_http_status_per_key, tyk_http_status_per_oauth_client
Let us know how it goes
No luck, it is still exposing the metrics.
Olu
April 25, 2023, 4:35pm
8
I’ll check this. I see you mentioned this happens on helm chart in Kubernetes.
I missed this earlier.
Olu
May 3, 2023, 11:17am
9
@Kaushal_Prajapati Confirmed the behaviour and opened and internal ticket. Will update this thread once it’s fixed.
In the meantime, can you use the config file to enable it
"disabled_metrics": [
"tyk_http_status",
"tyk_http_status_per_path",
"tyk_http_status_per_key",
"tyk_http_status_per_oauth_client",
"tyk_latency"
],
I tried it and it worked
1 Like
Olu
May 3, 2023, 4:36pm
10
Actually can you double check using comma-separated values? I can see the "Processing metric:tyk_http_status"
message stripped in pump logs when debug mode is enabled.
value: >-
tyk_http_status,tyk_http_status_per_path
Kindly let us know.
It works with config. Thank you!!