ELK入门(十八)——KibanaAPMserver安装部署

ELK入门(十八)——KibanaAPMserver安装部署

2023年7月17日发(作者:)

ELK⼊门(⼗⼋)——KibanaAPMserver安装部署⼀、前⾔安装内容:elasticsearch-7.10.1-linux-x86_(依赖,注意版本)kibana-7.10.1-linux-x86_(依赖,注意版本)apm-server-7.10.1-linux-x86_ (服务端包,注意版本)(终端包,最新版就⾏)前两者就不介绍了,⽹上的博客很多,会开始安装apm的应该也已经实现ELK搭建了。本⽂主要介绍apm和apm-agent的安装过程开启Kibana,打开APM界⾯并setup instructions⽹页很友好地给出了具体的配置过程。我在elasticsearch路径下创建了apm⽂件夹,apm server 和apm agent都放在这个底下⼀、安装APM1.安装包下载完安装包后,在elasticsrarch/路径下创建⽂件夹apm,将压缩包解压到该⽂件夹下cd /data/elk-ayers/elasticsearch-7.10.1-node01/mkdir apmcd apmtar -xvf apm-server-7.10.1-linux-x86_

2.配置 apm-server-7.10.1-linux-x86_64vim ################################################ APM Server ################################################apm-server: # Defines the host and port the server is listening on. Use "unix:/path/" to listen on a unix domain socket. #apm服务端对外提供http访问ip,端⼝ ⽬前apm-server本⾝不⽀持集群,可以通过反向代理的服务来实现 host: "ip:8200" #允许在kibana中对apm客户端的配置做调整 kibana: # For APM Agent configuration in Kibana, enabled must be true. #enabled: false enabled: true # Scheme and port can be left out and will be set to the default (`http` and `5601`). # In case you specify an additional path, the scheme is required: `localhost:5601/path`. # IPv6 addresses should always be defined as: `[2001:db8::1]:5601`. #host: "localhost:5601" #配置对应kibana的访问地址, host: "ip:5601"#================================= Template =================================# A template is used to set the mapping in Elasticsearch.# By default template loading is enabled and the template is loaded.# These settings can be adjusted to load your own template or overwrite existing ones.# Set to false to disable template d: true# Template name. By default the template name is "apm-%{[n]}"# The template name and pattern has to be set in case the elasticsearch index pattern is : "apm-%{[n]}"# Template pattern. By default the template pattern is "apm-%{[n]}-*" to apply to the default index settings.# The first part is the version of apm-server and then -* is used to match all daily indices.# The template name and pattern has to be set in case the elasticsearch index pattern is n: "apm-%{[n]}-*"#================================ Outputs =================================# Configure the output to use when sending the data collected by apm-server.#关闭iml策略d: false#-------------------------- Elasticsearch output --------------------------csearch: # Array of hosts to connect to. # Scheme and port can be left out and will be set to the default (`http` and `9200`). # In case you specify and additional path, the scheme is required: `localhost:9200/path`. # IPv6 addresses should always be defined as: `[2001:db8::1]:9200`. # hosts: ["localhost:9200"] hosts: ["ip:9200","ip:9200"] index: "apm-%{[n]}-%{+}"3、启动和查看#⾮后台启动服务⽅式./apm-server#后台启动服务⽅式nohup ./apm-server > /dev/null 2>&1 &运⾏情况查看#查看服务进程ps -ef|grep apm-server

#⽇志信息查看,以nohup运⾏时可以查看# find / -name l /路径/在Kibana查看,单击check按钮,发现成功检测到我们的APM⼆、安装Apm agent (以Java为例)1.安装包当前apm⽂件夹下存在apm-server-7.10.1-linux-x86_64,再创建⼀个apm-agent⽂件夹cd /data/elk-ayers/elasticsearch-7.10.1-node01/apmmkdir apm-agentcd apm-agent2.配置按照官⽹提⽰输⼊下⽅代码。注意要调整javaagent、server_urls、最后⼀⾏,分别是 路径与⽂件名 、 ip:port 、我们想部署的jar包。java -javaagent:/data/elk-ayers/elasticsearch-7.10.1-node01/apm/apm-agent/ -e_name=my-application -_urls=172.20.64.5:8200 -ation_packages=e -jar 3.查看进程ps -ef|grep Delastic发现有进程产⽣了,在kibana界⾯查看,发现⽣成了my-application

问题⼩结: to access jarfile 这个问题⼀般是⽂件名或者路径出错了,检查以下路径和⽂件名,检查该⽂件是否存在

参考博客:

发布者:admin,转转请注明出处:http://www.yc00.com/xiaochengxu/1689544783a264909.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信