Install Metricbeat that collectes metrics from System or Services.

For Metricbeat details, refer to the official site.

[1] Install Metricbeat. Configure Elasticsearch repository before it.
[root@quofact ~]#

yum -y install metricbeat
[2] Configure basic settings and start Metricbeat.

[root@quofact ~]#

vi /etc/metricbeat/metricbeat.yml
# line 67: if use Kibana, uncomment and specify output host
# if SSL is enabled on Kibana, hostname should be the same with the hostname in certs
setup.kibana:
.....
  host: "https://quofact.com:5601"

# line 92: specify output host
# the default is localhost’s Elasticsearch
# if output to Logstash, comment out Elasticsearch and uncomment logstash lines
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]

.....
.....

#output.logstash:
  # The Logstash hosts
  #hosts: ["localhost:5044"]

[root@quofact ~]#

vi /etc/metricbeat/metricbeat.reference.yml
# line 51: set items to collect data
# enable and disable to comment out and uncomment
- module: system
  metricsets:
    - cpu             # CPU usage
    - load            # CPU load averages
    - memory          # Memory usage
    - network         # Network IO
    - process         # Per process metrics
    - process_summary # Process summary
    - uptime          # System Uptime
    - socket_summary  # Socket summary
    #- core           # Per CPU core usage
    #- diskio         # Disk IO
    #- filesystem     # File system usage for each mountpoint
    #- fsstat         # File system summary metrics
    #- raid           # Raid
    #- socket         # Sockets and connection info (linux only)

# line 1650: if use Kibana, uncomment and specify output host
# if SSL is enabled on Kibana, uncomment ssl related lines
# if your certs is self-siged one, ssl.verification_mode should be [none]
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: "quofact.com:5601"

  # Optional protocol and basic auth credentials.
  protocol: "https"
  #username: "elastic"
  #password: "changeme"

  # Optional HTTP Path
  #path: ""

  # Use SSL settings for HTTPS. Default is true.
  ssl.enabled: true

  # Configure SSL verification mode. If `none` is configured, all server hosts
  # and certificates will be accepted. In this mode, SSL based connections are
  # susceptible to man-in-the-middle attacks. Use only for testing. Default is
  # `full`.
  ssl.verification_mode: none

[root@quofact ~]#

systemctl start metricbeat

[root@quofact ~]#

systemctl enable metricbeat
[3] Make sure the data has been collected normally.
# index list

[root@quofact ~]#

curl localhost:9200/_cat/indices?v
# document list on the index

[root@quofact ~]#

curl localhost:9200/metricbeat-7.1.1-2019.06.14-000001/_search?pretty
{
  "took" : 7,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 92,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "metricbeat-7.2.3-2020.06.14-000001",
        "_type" : "_doc",
        "_id" : "CnijVGsBrQK6anSSaupF",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2020-03-20T06:18:39.125Z",
          "metricset" : {
            "name" : "network"
          },
          "service" : {
            "type" : "system"
          },
.....
.....
[4] If Kibana is running, it’s possible to import data to sample Dashboards.
[root@quofact ~]#

metricbeat setup –dashboards

Loading dashboards (Kibana must be running and reachable)
Loaded dashboards

 

metricbeat-system-dashboard