IAmADryRiceMan opened a new issue, #4438: URL: https://github.com/apache/hertzbeat/issues/4438
### Question 我在使用 HertzBeat 监控 Oracle 数据库时,开启了监控模板中的 reuseConnection: true(复用连接)。这种机制在正常场景下能显著降低数据库连接建立的开销,提升采集性能。但在实际运维中,我发现了一个潜在的监控遗漏问题: 当 HertzBeat 与 Oracle 之间的网络被阻断(例如防火墙策略变更),或者 Oracle 服务端调整了某些参数(如监听器配置、账号权限等),导致新建连接无法建立时,由于 HertzBeat 连接缓存中仍保留着之前建立的旧连接,采集任务会继续通过这条旧连接获取数据。从 HertzBeat 的日志和监控页面看,一切“正常”,不会触发任何告警,造成监控假象。 只有当旧连接因超时或被强制断开后,采集才会真正失败。但默认情况下,这个旧连接可能存活很长时间(取决于网络层 TCP Keepalive 和数据库服务端设置),在此期间监控形同虚设。 使用ssh端口监控系统也是这样的 因此想咨询: HertzBeat 的 采集器是否支持配置连接池参数(如最大存活时间、空闲超时)来主动淘汰旧连接? 如果不支持,是否有计划在未来版本中增加此类配置? 目前推荐的实践方案是什么?除了调整采集频率、依赖 Oracle SQLNET.EXPIRE_TIME、使用 conntrack 清理等外部手段外,是否还有其他内置的优化方式? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org
