prometheus - blackbox exporter ssh 连接测试问题
问题描述
伙计们:
我正在使用 blackbox exporter 来测试许多远程服务器的 ssh 端口 22,模块是 ssh_banner。问题是它总是为每个 ssh 测试打印一个远程服务器的日志。:
Oct 20 10:23:14 hpit32 sshd[14073]: Did not receive identification string from ******
Oct 20 10:23:16 hpit32 sshd[14074]: Did not receive identification string from ******
有谁知道如何在不更改 sshd 日志级别或任何 sshd 配置的情况下解决此问题。
谢谢
解决方案
这对我有用:
ssh_banner:
prober: tcp
timeout: 5s
tcp:
query_response:
- expect: "^SSH-2.0-"
- send: "SSH-2.0-blackbox-ssh-check"
这已经让 sshd 高兴了。
推荐阅读
- widget - 离子应用程序的客户实时聊天小部件
- c# - 仅作用于 C# 中具有相同文件名结构的文件
- python - 获取 simplejson.scanner.JSONDecodeError:期望值:第 2 行第 1 列(字符 1)
- javascript - 如何断言未定义的东西?
- html - 如何在我的 SharePoint 网页上创建 img 按钮
- konvajs - 不使用 textarea 的 Konva 文本编辑选项
- java - 错误 R10(启动超时)> Web 进程未能在启动后 90 秒内绑定到 $PORT
- .net - 如果进入 select linq,如何做一个条件?
- php - Apache FastCGI:“(104)对等方重置连接:mod_fcgid:从 FastCGI 服务器读取数据时出错”
- python - Matplotlib 使用 ax.set() 旋转 xticklabels