主 题:hetrixtools的win-agent 将Uptime Monitoring Nodes加入白名单--powershell
发 布 者:ele
标签分类: 技术
时 间:2026-08-09 10:44:12
内容预览:最近重度用hetrixtools做探针和提醒 免费版也够用。但win上有icmp防火墙,需要导入白名单,而官方好像没有提供。于是改造了linux的获取方法。参考⬇️ 但github上的好像很久更新了,应该就是python写的小工具https://docs.hetrixtools.com/installing-the-windows-server-monitoring-agent/Linux的csfhttps://docs.hetrixtools.com/how-to-whitelist-our-uptime-monitoring-nodes-in-csf/直接在powershell里以管理员身份运行;并在防火墙高级管理里面关闭其他ban icmp v4的规则;下面的规则是除了白名单都block。装好后看面板就显示正常了。 1. 从 HetrixTools 获取监控节点数据$data = Invoke-RestMethod -Uri "https://hetrixtools.com/resources/uptime-monitor-ips.txt" 2. 逐行解析提取 IP(过滤空行,以空格分割并取第二列的值)$ips = $data -split '\r?\n' | Where-Object { $_ -match '\S' } | ForEach-Object { $parts = $_ -split '\s+' $parts[1] } 3. 设置 Windows 防火墙规则名称$ruleName = "HetrixTools_Uptime_Monitors_Whitelist" 4. 创建或更新防火墙规则 (允许入站)if (Get-NetFirewallRule -DisplayName $ruleName -ErrorAction Silent
直达链接: https://www.nodeseek.com/post-864894-1
 
 
Back to Top