Description:
I am encountering an issue with PMM Client where the vm_agent process fails to scrape metrics due to exceeding the default -promscrape.maxScrapeSize limit. I enabled debug mode and captured the following error:
the response size exceeds -promscrape.maxScrapeSize=67108864; either reduce the response size for the target or increase -promscrape.maxScrapeSize.
I have reviewed the Percona documentation on VictoriaMetrics, which mentions the use of environment variables. However, it is unclear whether these can be applied to the PMM Client (pmm-agent) and how to set them for vm_agent.
I tried setting the environment variable both in the pmm-agent binary installation and using the Docker image, but it didn’t work.
Steps to Reproduce:
- Set up PMM Client and register the MySQL service using
pmm-admin. - Enable debug mode and review the logs when
vm_agentis scraping metrics. - Check for the error related to
-promscrape.maxScrapeSizewhen scraping MySQL metrics. - Attempt to set
VM_promscrape_maxScrapeSizeto a higher value, both in the Docker container and using the binary.
Version:
- PMM Server: 2.42.0
- PMM Client: 2.42.0
Logs:
2024-10-18T08:39:06.218+00:00 level=info msg="cannot scrape target... the response size exceeds -promscrape.maxScrapeSize=67108864; either reduce the response size for the target or increase -promscrape.maxScrapeSize" component=agent-process type=vm_agent
Expected Result:
The vm_agent should be able to scrape the metrics successfully without exceeding the maxScrapeSize limit, or the environment variable to increase the block size should be passed and applied to vm_agent.
Actual Result:
vm_agent is unable to scrape metrics due to the size limit being exceeded, and attempts to set promscrape.maxScrapeSize have not worked. It is unclear whether environment variables can be applied to vm_agent running under PMM Client, or if they are only for PMM Server.
Additional Information:
- The
vm_agentprocess runs with-envflag.prefix=VMAGENT_and-envflag.enable=true, but setting variables likeVMAGENT_promscrape_maxScrapeSizedoes not seem to have any effect. - The documentation does not clarify whether environment variables can be applied on the client side and what prefix (
VM_orVMAGENT_) should be used forvm_agent.