Beats를 통한 Docker 및 Kubernetes 힌트 기반 자동 검색 | Elastic Blog
엔지니어링

Beats를 통한 Docker 및 Kubernetes 힌트 기반 자동 검색

6.0 Beats support for container monitoring . . Docker Kubernetes Filebeat Metricbeat . Beats . .

, , . .

. , , , , . IP .

.

Beats autodiscover schematics

. .

metricbeat.autodiscover:
  providers:
   - type: docker
     templates:
       - condition.contains:
           docker.container.image: etcd
         config:
          - module: etcd
            metricsets: ["leader", "self", "store"]
            hosts: "${data.host}:2379"

output.elasticsearch:
  hosts: [“localhost:9200”]

docker Metricbeat . 릿 . , etcd ( name:tag ). etcd , Metricbeat etcd ${data.host} IP .

.

1.

Beats Autodiscover Kubernetes Docker . . , .

2.

. .

3.

릿 , . IP . .

4. /

. Metricbeat Filebeat Filebeat .

. .

, Docker Kubernetes adddockermetadata addkubernetesmetadata . .

6.3 . Beats .

. .

Kubernetes (, reference Kubernetes manifest for filebeat ).

filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true

. Kubernetes Pod Docker Filebeat Metricbeat . , Java Pod .

annotations:
  co.elastic.logs/multiline.pattern: '^\['
  co.elastic.logs/multiline.negate: 'true'
  co.elastic.logs/multiline.match: after

Pod Filebeat , Java . .

. NGINX , .

annotations:
  co.elastic.logs/module: nginx
  co.elastic.logs/fileset.stdout: access
  co.elastic.logs/fileset.stderr: error

, . co.elastic.logs/fileset .

Metricbeat , Metricbeat NGINX . , . ${data.host} IP .

annotations:
  co.elastic.metrics/module: nginx
  co.elastic.metrics/metricsets: stubstatus
  co.elastic.metrics/hosts: '${data.host}:80'
  co.elastic.metrics/period: 10s

Filebeat Metricbeat , .

. . , .

. ! Beats forum .