monitoring docker container metricsmonitoring docker container metrics containers : containers solve...

6
Monitoring Docker Container Metrics Cybergate.tech

Upload: others

Post on 16-Oct-2020

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

Monitoring DockerContainer Metrics

Cybergate.tech

Page 2: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

Monitoring Docker Container Metrics

Containers : Containers solve a critical issue in the life of application

developer. Developers write code on the local environment.

When they are ready to move that code to production

environment this is where problems arise. The code that worked

perfectly on the testing environment doesn’t work in production.

The reasons for this are varied different operating system,

different dependencies, different ibraries.

Containers have small foot print.

When we have multiple containers we would require to monitor these containers or Infrastructure and we require an efficient monitoring solution to ensure that our application is running on containers are performing Properly and Elastic Provides us the monitoring feature.

Monitoring

Page 3: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

Containers isolation is done at the kernel level.

Containers isolates the applications and their

dependencies from the main hardware which makes the

deployment easy.

Multiple units could share the same hardware facilities on

the same host machine and which makes cost effective.

Containers are Much more Light weight comparing to VMs.

VIRTUAL MACHINE (VM) VM

Service A Service CService B

Bins/Libs Bins/Libs

Guest OS Guest OS

Hypervisor

Infrastructure

CONTAINER

Service C

Bins/Libs

CONTAINER

Service B

Bins/Libs

CONTAINER

Service A

Bins/Libs

Host OS

Docker

Infrastructure

Page 4: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

Docker

Docker is one of the most popular Container Platform and it is

light weight as it shares the host Operating system kernel.

Metricbeat is a light weight shipper to be installed on the server

to periodically collect metrics from the hosts and service

running.

Metricsets define the data about our docker containers that we

will get back.

Metricbeat helps to collect the metrics of the services or

applications which includes Docker and Kubernetes.

Docker Module Fetches & ships metrics from Docker containers

to ES or Logstash.

Changes to be made in the metricbeat.yml file.

Monitoring Docker:

Page 5: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

Metricbeat Docker Configuration :

1. Containers : Container metricset collects information and statistics

about running Docker Containers.

2. cpu : It Collects runtime CPU metrics.

3. diskio : It collects the disk I/O metricset.

4. healthcheck : It is available from containers where the docker health

check has been enabled.

5. image : Image metricset of the docker module.

6. Info : Info metricset collects information based on docker Remote API.

7. Memory : Memory metricset collects memory metrics.

8. hosts: The Communication between host and docker Processes through

a Socket Connection.

Page 6: Monitoring Docker Container MetricsMonitoring Docker Container Metrics Containers : Containers solve a critical issue in the life of application developer. Developers write code on

9. period : it is recommended to run docker metricset with a period of

more than 3 seconds to avoid timeout.

Points to note down :

A dedicated dashboard is also available for monitoring docker

metrics but we need to enable it.

Pick the metricset that are relevant to the monitoring needs.

Metricset should be strictly greater then 3 seconds.

CyberGate Defense is an Emirati establishment founded with an objective to provide cyber security

services that would improve the overarching cyber security posture of the UAE. CyberGate has the

in-house depth and breadth of information and cyber security expertise required to respond to the

most technical information security challenges related to both Information and Operations.

+971 (0) 2 6655 855

+971 (0) 2 6712 211

Abu Dhabi, Al Bostan

Tower, Office 103.

[email protected]

www.cybergate.tech