kibana使用metricbeat性能监控
2021/5/8 10:27:11
本文主要是介绍kibana使用metricbeat性能监控,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
http://www.voidcn.com/article/p-wiipzvle-bza.html
安装下载
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list sudo apt-get update && sudo apt-get install metricbeat
配置启动
cat /etc/metricbeat/metricbeat.yml |grep -vE "^#|^$" metricbeat.config.modules: # Glob pattern for configuration loading path: ${path.config}/modules.d/*.yml # Set to true to enable config reloading reload.enabled: false # Period on which files under path should be checked for changes #reload.period: 10s setup.template.settings: index.number_of_shards: 1 index.codec: best_compression #_source.enabled: false setup.kibana: # Kibana Host # Scheme and port can be left out and will be set to the default (http and 5601) # In case you specify and additional path, the scheme is required: http://localhost:5601/path # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601 host: "192.168.1.43:5601" # Kibana Space ID # ID of the Kibana Space into which the dashboards should be loaded. By default, # the Default Space will be used. #space.id: output.elasticsearch: # Array of hosts to connect to. hosts: ["192.168.1.43:9200"] # Enabled ilm (beta) to use index lifecycle management instead daily indices. #ilm.enabled: false # Optional protocol and basic auth credentials. #protocol: "https" #username: "elastic" #password: "changeme" # The Logstash hosts #hosts: ["localhost:5044"] # Optional SSL. By default is off. # List of root certificates for HTTPS server verifications #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] # Certificate for SSL client authentication #ssl.certificate: "/etc/pki/client/cert.pem" # Client Certificate Key #ssl.key: "/etc/pki/client/cert.key" processors: - add_host_metadata: ~ - add_cloud_metadata: ~
启动和启动
update-rc.d metricbeat defaults 95 10 /etc/init.d/metricbeat restart #重新启动 metricbeat setup --dashboards #启动dashboards
查看kibana的dashboards
启动监控服务模块(nginx,redis,mysql)
metricbeat modules enable redis metricbeat modules enable mysql metricbeat modules enable nginx
查看服务性能监控
查看启动模块
metricbeat modules list #Enabled模块为启用模块 Disabled模块为未启用模块
.
启动新模块
启用新模块命令,例如启用nginx模块 metricbeat modules enable nginx
设置监控nginx
[email protected]:/etc/metricbeat/modules.d# cat nginx.yml # Module: nginx # Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.8/metricbeat-module-nginx.html - module: nginx metricsets: - stubstatus enabled: true period: 10s # Nginx hosts hosts: ["http://127.0.0.1"] # Path to server status. Default server-status server_status_path: "nginx_status" #username: "user" #password: "secret"
nginx设置
server { server_name _; location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } }
设置监控mysql
[email protected]:/etc/metricbeat/modules.d# cat mysql.yml # Module: mysql # Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.8/metricbeat-module-mysql.html - module: mysql metricsets: - status # - galera_status period: 10s # Host DSN should be defined as "user:[email protected](127.0.0.1:3306)/" # The username and password can either be set in the DSN or using the username # and password config options. Those specified in the DSN take precedence. hosts: ["tcp(192.168.1.39:3306)/"] # Username of hosts. Empty by default. username: root # Password of hosts. Empty by default. password: 123456 #- module: 45-mysql # metricsets: # - status # period: 10s # hosts: ["tcp(192.168.1.45:3306)/"] # username: ops # password: ops12300.
设置监控redis
- module: redis hosts: ["192.168.1.43:6379"] metricsets: ["info","keyspace"] enables: true period: 10s password: password相关文章
- 1. kibana使用metricbeat性能监控
- 2. ELK MetricBeat配置监控主机性能
- 3. [Metricbeat] Metricbeat监控golang服务器
- 4. metricbeat 监控 nginx 状况
- 5. 性能监控
- 6. 使用jconsole监控weblogic的性能
- 7. Golang使用pprof监控性能
- 8. 使用 mytop 监控mysql性能状态
- 9. 【zabbix】性能监控平台zabbix使用
- 10. MYSQL使用PMM进行性能监控
这篇关于kibana使用metricbeat性能监控的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-23DevExpress 怎么实现右键菜单(Context Menu)显示中文?-icode9专业技术文章分享
- 2024-12-22怎么通过控制台去看我的页面渲染的内容在哪个文件中呢-icode9专业技术文章分享
- 2024-12-22el-tabs 组件只被引用了一次,但有时会渲染两次是什么原因?-icode9专业技术文章分享
- 2024-12-22wordpress有哪些好的安全插件?-icode9专业技术文章分享
- 2024-12-22wordpress如何查看系统有哪些cron任务?-icode9专业技术文章分享
- 2024-12-21Svg Sprite Icon教程:轻松入门与应用指南
- 2024-12-20Excel数据导出实战:新手必学的简单教程
- 2024-12-20RBAC的权限实战:新手入门教程
- 2024-12-20Svg Sprite Icon实战:从入门到上手的全面指南
- 2024-12-20LCD1602显示模块详解