kibana使用metricbeat性能监控
发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,安装下载wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -sudo apt-get i
千家信息网最后更新 2025年02月03日kibana使用metricbeat性能监控
安装下载
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -sudo apt-get install apt-transport-httpsecho "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.listsudo 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 redismetricbeat modules enable mysqlmetricbeat modules enable nginx
查看服务性能监控
查看启动模块
metricbeat modules list #Enabled模块为启用模块 Disabled模块为未启用模块
.启动新模块
启用新模块命令,例如启用nginx模块metricbeat modules enable nginx
设置监控nginx
root@debian43:/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
root@debian43:/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:pass@tcp(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
模块
监控
服务
性能
命令
配置
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发透明化
吃鸡国服怎么选服务器
西安比较有实力的软件开发
数据库系统结构及其特点
学个网络技术学什么好
路由器软件开发是做什么的
网络安全法有多少章多少条啊
永康市广众网络技术
新东方互联网科技股份有限公司
吃鸡端游哪个服务器的人最菜
三个远离网络安全
如何排除数据库重复行
计算机网络技术什么意思
方舟生存进化斗罗大陆模组服务器
数据库技术总结
基于exce的软件开发
轩辕传奇无法连接服务器
事帮帮网络技术工作室
荣耀全名明星忘记区服务器怎么办
腾讯云服务器服务器管理器
全球网络安全企业百强排名
讴谷网络技术有限责任公司
利用云服务器建立家庭网络
抖音是数据库吗
涉及网络安全的规定
空气质量检测数据库
如何筑牢网络安全屏障
oracle数据库显示列数
组态王实时数据是数据库么
网络技术负责人职责