Metricbeat deployment and monitoring of Linux system metrics summary

Source: Internet
Author: User
Tags cpu usage disk usage kibana


Metricbeat Light-weight indicator collector


Used to collect metrics from systems and services. From CPU to memory, from Redis to Nginx,metricbeat, you can deliver a variety of system and service statistics in a light-weight way.


System-level monitoring, more concise


Deploy Metricbeat to all your Linux, Windows, and MAC hosts and connect it to Elasticsearch: you get system-level CPU usage, memory, file system, disk IO and network IO statistics, and get the same Statistics for each process similar to the top command on the system. Explore [Online Demo] (https://demo.elastic.co/app/kibana#/dashboard/Metricbeat-system-overview?_g= ()


Installing Metricbeat
wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.3.2-linux-x86_64.tar.gz
tar -zxvf metricbeat-6.3.2-linux-x86_64.tar.gz
mv metricbeat-6.3.2-linux-x86_64 metricbeat
Configure Metricbeat
metricbeat.config.modules:
   path: $ {path.config} /modules.d / *. yml
   reload.enabled: false
setup.template.settings:
   index.number_of_shards: 1
   index.codec: best_compression
setup.kibana:
   host: "localhost: 5602"
output.elasticsearch:
   hosts: ["192.168.1.1:29200"]
## Enable sytem monitoring
$ cat modules.d / system.yml
-module: system
   period: 10s
   metricsets:
     -cpu
     -load
     -memory
     -network
     -process
     -process_summary
     #-core
     -diskio
     -socket
   processes: [‘. *‘]
   process.include_top_n:
     by_cpu: 5 # include top 5 processes by CPU
     by_memory: 5 # include top 5 processes by memory

-module: system
   period: 1m
   metricsets:
     -filesystem
     #-fsstat
   processors:
   -drop_event.when.regexp:
       system.filesystem.mount_point: ‘^ / (sys | cgroup | proc | dev | etc | host | lib) ($ | /) ′

-module: system
   period: 1m
   metricsets:
     -uptime 
Start Kibana, ES, metricbeat
/usr/local/metricbeat/metricbeat -e -c /usr/local/metricbeat/metricbeat.yml
Collect summaries using Granfan visual system metrics
Indicator Type Indicators indicator meaning
Cpu system.cpu.total.pct Total CPU Usage Percentage
Cpu System.cpu.cores Number of CPU Cores
Cpu system.cpu.iowait.pct Percentage of CPU time waiting for input and output
Cpu system.cpu.user.pct Percentage of CPU occupied by user space
Cpu system.cpu.system.pct Percentage of CPU consumed by kernel space
Cpu system.cpu.nice.pct Process changes consume CPU percentage
Cpu system.cpu.idle.pct Percentage of idle CPU
Memory System.memory.used.bytes Memory usage Size
Memory system.memory.used.pct Memory usage percent
Memory System.memory.free Memory remaining size
Memory System.memory.total Total Memory Size
Memory system.memory.swap.used.pct Swap memory usage percent
Memory System.memory.swap.used.bytes Swap memory usage Size
Memory System.memory.swap.free Swap remaining memory
Memory System.memory.swap.total Total Swap Memory size
Network System.network.name Nic Name
Network System.network.in.packets Number of network card ingress packages
Network System.network.in.errors NIC Ingress error Packet number
Network system.network.in.dropped Network card ingress reject packet number
Network System.network.in.bytes Network Card Entry Package size
Network System.network.out.packets Number of network card egress NIC Packets
Network System.network.out.bytes Network card egress Packet size
Network System.network.out.errors Network card egress Error packet number
Network system.network.out.dropped Number of rejection packets for network card egress
Load System.load.1 1-minute system average load
Load System.load.5 5-minute system average load
Load system.load.15 15-minute system average load
Process_summary system.process.summary.stopped Stop process
Process_summary System.process.summary.zombie Zombie Process
Process_summary System.process.summary.unknown Stateless process
Process_summary System.process.summary.total Total number of processes
Process_summary System.process.summary.sleeping Hibernation process
Process_summary System.process.summary.running Running processes
Uptime system.uptime.duration.ms System Run time
Socket System.socket.local.ip Native IP
Diskio System.diskio.iostat.read.per_sec.bytes Amount of data read from the device (drive expressed) per second (kb_read/s)
Diskio System.diskio.iostat.write.per_sec.bytes Amount of data written to the device (drive expressed) per second (KB_WRTN/S)
Diskio System.diskio.iostat.read.request.per_sec Number of sectors read per second (RSEC/S)
Diskio System.diskio.iostat.write.request.per_sec Number of sectors written per second (wsec/s)
Diskio System.diskio.iostat.read.request.merges_per_sec How much of this device-dependent read request is merge (rrqm/s) per second
Diskio System.diskio.iostat.write.request.merges_per_sec How much of this device-dependent write request is merge (wrqm/s) per second
Diskio System.diskio.iostat.await Average time (in microseconds) of processing per IO request
Diskio System.diskio.read.bytes Total amount of data read (Kb_read)
Diskio System.diskio.write.bytes Total amount of data written (KB_WRTN)
FileSystem System.filesystem.device_name File System device Name
FileSystem System.filesystem.free Disk space remaining
FileSystem System.filesystem.mount_point Disk Mount Partition
FileSystem System.filesystem.total Total disk size
FileSystem system.filesystem.used.pct Disk usage
FileSystem System.filesystem.used.bytes Disk usage Size
FileSystem System.filesystem.used.bytes Disk usage Size
Drawing templates


System-metrics


Effects such as




Reference:
  • Https://www.elastic.co/cn/products/beats/metricbeat
  • Https://www.elastic.co/guide/en/beats/metricbeat/current/exported-fields-system.html
  • Personal blog


Metricbeat deployment and monitoring of Linux system metrics summary


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.