Closed LeoQuote closed 1 year ago
Is squid and exporter running on a same server?
yes, in the same server , squid exporter is running in container with host network enabled
Can you try to fetch metrics locally to see if that times out as well? You can use this guide: http://etutorials.org/Server+Administration/Squid.+The+definitive+guide/Chapter+14.+Monitoring+Squid/14.2+The+Cache+Manager/
squid seems to have respond with a 400 response
<p>The following error was encountered while trying to retrieve the URL: <a href="8118">8118</a></p>
<blockquote id="error">
<p><b>Invalid URL</b></p>
</blockquote>
what should I do to fix this? how did squid exporter managed to get these metrics?
Can you post the command you tried and got this error? It's also helpful to share your squid config (redact sensitive data), maybe in pastebin.com
I'm guessing it might be you didn't enable cache manager for your instance.
After checking the cache manager
page in squid manual, I tried
time curl http://localhost:8118/squid-internal-mgr/info
and it looks ok, and at the same time , the exporter can be scraped, too. I'll check it again when scraping time out.
The case I described above occurs occasionall, but not constantly, I'm trying to figure out the root cause.
Is it possible to take 10s or more to scrape the metric page?
I don't think that's normal. If not mistaken that usually means either the squid server is overloaded and cannot response to the request or it's crashing.
What you could do is enabling debug logs for the squid and see what happens, is request actually gets to the server? if not, why? is the process crashed? if yes, then why the response takes so long?
I'd say the response in normal situation should not take more than a few milliseconds. Squid has most of this data already ready, the call doesn't really do much and just fetches the data.
Describe the bug I set up a scrape job for squid exporter and got scrape timeout occasionally
How can I troubleshoot this? I saw no logs either in squid exporter log or squid log.
What could be the cause of this timeout, what do you suggest to set the timeout to?
To Reproduce start a exporter to exporter squid metrics
Expected behavior scrape successfully, no timeout
actual: scrape is quite slow, response time sometimes can go up to 10s or more.
OS (please complete the following information):
Linux misaka1 5.9.12-gentoo #2 SMP Tue Dec 8 11:59:44 CST 2020 x86_64 AMD EPYC 7K62 48-Core Processor AuthenticAMD GNU/Linux
Additional context Add any other context about the problem here.