Pingdom监控工具检测HTTP 302发现间歇性响应


Pingdom monitoring tool detecting HTTP 302 Found responses intermittently

我在使用Pindom监控工具检查网站状态时遇到间歇性问题。

每隔10-15分钟,我就会收到一个警报,说发现了一个302。我不能理解的是,我没有做任何302临时重定向。然而,我正在进行301次重定向(在某些情况下)。

这可能是平多姆的假阳性吗?

此外,我在代码中有一个重定向,可以做到这一点。不会指定HTTP响应代码在这里引起问题?

header('Location: http://www.ayrshireminis.com');
exit();

平多姆数据:

Request 1
GET / HTTP/1.0
User-Agent: Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)
Host: www.ayrshireminis.com
Received header
302 Found
Date: Tue, 24 Jul 2012 13:13:25 GMT
Server: Apache
Set-Cookie: prev_session_id=2a7001f5caa79bd36995953bf4853675; expires=Thu, 23-Aug-2012 13:13:25 GMT; path=/; domain=ayrshireminis.com
Location: http://www.ayrshireminis.com/
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=ISO-8859-1

在我看来,响应上设置了一个cookie,然后将您重定向到同一页面。因为Pingdom使用了许多不同的监控源,cookie重定向行为会导致很多问题。再说一遍,你可能需要它为实际的网站访问者。

与其监控网页的根目录,我建议只为Pingdom创建一个单独的/状态页面:

  1. 不设置或使用cookie
  2. 对应用程序和支持服务执行廉价的端到端健康检查
  3. 仅当所有检查结果正常时,返回200响应代码