没有侦听器的 PerfMon 服务器代理

PerfMon Server Agent without listener

PerfMon Server Agent 与 JMeter 的侦听器 jp@gc - PerfMon Metrics Collector 一起工作正常。

但是它可以充当独立的应用程序性能监控 (APM) 代理吗?

我看到我可以连接并请求特定指标

Server Agent uses simple plain-text protocol, anyone can use agent's capabilities implementing client, based on kg.apc.perfmon.client.Transport interface. If anyone's interested, start the topic on the support forums and I'll describe how to connect third-party client app to agent.

但是我可以在我的应用程序启动时启动 PerfMon 服务器并在没有任何侦听器的情况下保存指标 "always"(直到应用程序关闭)吗?

我还可以在 jp@gc - PerfMon Metrics Collector 以外的工具中显示结果吗?

如果您查看 Server Agent documentation you'll learn that it can be used by any application capable of sending plain text message over TCP or UDP protocol (i.e. telnet or netcat),那么您只需将指标名称发送到 运行 服务器代理即可触发指标收集。

关于在您的应用程序启动时启动 PerfMon - Server Agent 是普通的纯 Java 应用程序,因此方法会因您使用的操作系统和应用程序的性质而异。您很可能需要想出一个 shell 脚本来启动两者。

目前您将无法在没有 "client" 的情况下使用服务器代理 - 一个将通过 TCP 或 UDP 向其请求指标的应用程序。因此,如果您不打算使用 JMeter,您将需要提出一个 TCP 或 UDP 客户端解决方案,该解决方案将定期查询服务器代理以获取指标。输出将是普通的 CSV 文件,可以使用任何工具(Libre Office Calc, Grafana, Google Charts,随便什么)

更多信息:How to Monitor Your Server Health & Performance During a JMeter Load Test