AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-239791

Patrick's questions

Martin Hope
Patrick
Asked: 2022-02-18 02:30:09 +0800 CST

调试 Prometheus Blackbox Exporter http_2xx probs

  • 0

我们正在使用 Prometheus Blackbox Exporter(blackbox_exporter,版本 0.19.0)来检查 HTTP 端点。
现在我们需要使用fail_if_body_matches_regexp.
当 html 正文中存在某个单词时,检查应该失败。
为此,我们创建了以下 http prob 配置:

Module configuration:
prober: http
timeout: 5s
http:
    valid_http_versions:
        - HTTP/1.1
        - HTTP/2
        - HTTP/2.0
    preferred_ip_protocol: ip4
    ip_protocol_fallback: true
    fail_if_body_matches_regexp:
        - The page is temporarily unavailable
    follow_redirects: true
tcp:
    ip_protocol_fallback: true
icmp:
    ip_protocol_fallback: true
dns:
    ip_protocol_fallback: true

不幸的是,检查没有按预期工作。即使网站包含The page is temporarily unavailable在 html 正文中,检查仍然成功。

Logs for the probe:
ts=2022-02-17T09:46:31.403831228Z caller=main.go:320 module=http_2xx target=https://site.local level=info msg="Beginning probe" probe=http timeout_seconds=5
ts=2022-02-17T09:46:31.403959629Z caller=http.go:335 module=http_2xx target=https://site.local level=info msg="Resolving target address" ip_protocol=ip4
ts=2022-02-17T09:46:31.500911613Z caller=http.go:335 module=http_2xx target=https://site.local level=info msg="Resolved target address" ip=XXX.XXX.XXX.XXX
ts=2022-02-17T09:46:31.501017313Z caller=client.go:251 module=http_2xx target=https://site.local level=info msg="Making HTTP request" url=https://XXX.XXX.XXX.XXX host=site.local
ts=2022-02-17T09:46:31.614236162Z caller=main.go:130 module=http_2xx target=https://site.local level=info msg="Received HTTP response" status_code=200

Metrics that would have been returned:
# HELP probe_failed_due_to_regex Indicates if probe failed due to regex
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0

要检查网站是否在 Prometheus Blackbox Exporter 中正确加载,我想检查测试期间收到的 html 正文。有谁知道这是否可能并且可能有一些进一步的调试提示?

monitoring prometheus
  • 1 个回答
  • 635 Views
Martin Hope
Patrick
Asked: 2017-05-12 04:24:40 +0800 CST

DFS 引用缓存持续时间

  • 1

我们的总部有两台基于域的 DFS 服务器。一个较小的位置通过 VPN 与总部相连,并使用 DFS 访问总部和自己位置的共享资源。

如果出现网络问题,我们希望增加引用缓存持续时间。因此,小位置仍然可以访问自己位置的共享资源,因为客户端具有本地 dfs 缓存。

这就是计划/想法。我测试了设置并认识到,客户端在失去与 dfs 服务器的连接后无法连接到共享。但如果我跑

dfsutil.exe 缓存引用

,我在缓存中看到来自共享的 UNC 路径。

是否存在“缺乏考虑”?如果 DFS 服务器不可用,客户端缓存是否不足以访问共享?

感谢您的帮助或任何提示

帕特里克

dfs
  • 1 个回答
  • 1431 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve