java - Kibana 中 APM 的代理状态中未显示收到的 APM Java 代理数据
问题描述
我在 ec2 实例中运行 ELK 并在其中安装了 apm-server
APM 服务器版本:7.x
我有一个带有 npm 的 springboot 应用程序,用于在其他 ec2 实例中进行负载测试还在其中安装了 apm 代理
APM 代理版本:1.x
在 APMserver.yml 中:
我已经为主机和输出提供了私有 ip
现在,当我尝试使用 curl http://xxxx.8200与 apm-server 连接时,它从 springboot 服务器连接
启动应用程序的命令:
java -javaagent:elastic-apm-agent-1.22.0.jar --config service_name=my-cool-service server_url=http://private(or)publicip:8200 -jar order-service/target/order-service-1.0-SNAPSHOT.jar
输出:
2021-03-27 04:45:59,879 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.22.0 as my-cool-service on Java 11.0.10 Runtime version: 11.0.10+9-Ubuntu-0ubuntu1.18.04 VM version: 11.0.10+9-Ubuntu-0ubuntu1.18.04 (Ubuntu) Linux 4.15.0-1051-aws
2021-03-27 04:45:59,880 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - VM Arguments: [-javaagent:elastic-apm-agent-1.22.0.jar, -Delastic.apm.service_name=my-cool-service, -Delastic.apm.application_packages=org.example,org.another.example, -Delastic.apm.server_url=http://x.x.x.x:8200]
2021-03-27 04:46:03,041 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: { "build_date": "2021-03-18T05:15:57Z", "build_sha": "ef735c0cc1e5aa0d4fe4a363804390776e7775fe", "version": "7.12.0"}
2021-03-27 04:46:03,063 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2021-03-27 04:46:03,074 [elastic-apm-remote-config-poller] INFO co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Received new configuration from APM Server: {}
卷曲输出:
{
"build_date": "2021-03-18T05:15:57Z",
"build_sha": "ef735c0cc1e5aa0d4fe4a363804390776e7775fe",
"version": "7.12.0"
}
Kibana.log
没有错误,但以下消息
{"type":"log","@timestamp":"2021-03-27T04:27:58+00:00","tags":["info","plugins","apm"],"pid":1627,"message":"Config was not found for my-cool-service/undefined"}
当我检查代理状态时
还没有收到代理的数据
解决方案
您需要将application_packages添加到代码中并开始在 Kibana 中查看数据。
-Delastic.apm.service_name=my-cool-service
-Delastic.apm.application_packages=org.example,org.another.example
-Delastic.apm.server_url=http://localhost:8200
推荐阅读
- delphi - Delphi 编译器期望 [ 在 TStringsGrid cols(TStrings) 属性的调用索引上
- java - Jcheckbox 在 Swing Java 中总是返回假
- r - 这个data.table R代码有一个简洁/最简单的方法吗?
- java - 查询有关 CompletableFuture 的语义?
- firebase - 为什么使用 on_snapshot 时 Firestore 会发送所有结果,而不仅仅是新项目?
- python - Jupyter 的内核有问题。怎么修?
- python - 在 django 项目中使用 Python 标记器进行弹性搜索
- reactjs - Typescript 3.7.2、React 和 Material UI 4.5.1 Snackbars - 尝试弹出错误但得到样式错误
- php - 显示数据库中的目录列表等数据(PHP SQL)
- laravel - 如何从每个循环中保存 Laravel 中的逗号分隔值