远程查询Windows事件日志(Linux)
现在我有一个运行 WMI 查询事件日志的 Java 应用程序,由于 WMI 的性质,速度慢得痛苦(好吧,不痛苦,但它可能无法跟上我们的域控制器的速度) ,并且 dllhost.exe 在提供 WMI 请求和远程 DCOM 对象时受到重创,仅仅读取日志就完全没有必要。
接下来的探索是 Windows RPC 调用,但我很困惑...Windows RPC 实现(有点没有很好地记录事件日志)只是 WMI 的另一个名称吗?或者我会收到原始事件日志信息吗?
除了这两种方法之外,有谁知道还有其他方法可以挂钩事件日志创建事件,以便我可以让服务器自动将日志推送给我吗?如果它可以在 Linux 中相当容易地实现,那就太好了,但如果必须的话,我可以篡改 WINE 和 Mono...
或者最好在所有服务器上编写和部署脚本并让它们使用将其推送到 Linux 机器上的程序(尽管现在我必须担心所有这些脚本的正常运行时间)?
或者更好的是……我应该编写一个可以本地插入事件日志的 Java 服务,并将其安装在各种 Windows 计算机上,并以这种方式将日志传递到我的中央 Linux 盒子吗?
Right now I have a Java application running WMI querying event logs, this is painfully slow due to the nature of WMI (ok, not painfully, but it may not be able to keep up with our domain controller), and dllhost.exe gets hammered serving up WMI requests and remote DCOM objects, pretty unnecessary just to read logs.
The next bit of exploration is in Windows RPC calls, but I'm confused... is the Windows RPC implementation (sorta kinda not wonderfully documented for event logs) just another name for WMI? Or will I be receiving raw event log information?
Other than these two methods, does anyone know of any other ways to hook into the event log creation event so I can have the servers automatically push their logs to me? It would be nice if it was something that could be fairly easily implemented in Linux, but I can tamper with WINE and Mono if I have to...
Or would it probably be best to write and deploy scripts on all the servers and have them push it to my program on the Linux box (though now I have to worry about the uptime of all those scripts)?
Or better yet... should I just write a Java service that can plug into the event logs natively and install those on the various windows machines and have it hand off the logs to my central Linux box that way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Jarapac 看起来很有前景,我将深入研究一下,看看 Windows RPC 性能是否达到标准以及实施的难度。如果它相当简单:耶! Linux 上的 Windows RPC。
如果没有,如果没有您自己的实现,这是根本不可能的。 :(
Jarapac looks promoising, I'm going to dig a little bit at this and see if Windows RPC performance is up to par and how hard it is to implement. If it's fairly straight forward: Yay! Windows RPC on Linux.
If not, it's simply not possible without your own implementation. :(