Skip to content

Commit

Permalink
[release-1.1] cherrypick beat-exporter (#66)
Browse files Browse the repository at this point in the history
* �feat(metrics): export Filebeat metrics with beat-exporter (#35)

* added beat-exporter

* revert imagePullPolicy

* disable test & lint

* add filebeat-keeper Dockerfile

* replace base image
  • Loading branch information
Linjian Jiang authored and caicloud-bot committed Nov 12, 2019
1 parent c63dacc commit 091d499
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TARGETS ?= log-pilot filebeat-keeper
LOG_PILOT_IMAGE := $(REGISTRIES)/log-pilot:$(VERSION)
FILEBEAT_IMAGE := $(REGISTRIES)/filebeat:$(VERSION)

.PHONY: default container push
.PHONY: default container push test lint

default: push

Expand Down Expand Up @@ -59,3 +59,9 @@ container: build-linux
push: container
docker push $(LOG_PILOT_IMAGE)
docker push $(FILEBEAT_IMAGE)

test:
@echo "test is not used on this branch"

lint:
@echo "lint is not used on this branch"
1 change: 1 addition & 0 deletions build/filebeat-keeper/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM cargo.caicloud.xyz/library/filebeat:6.5.4
2 changes: 1 addition & 1 deletion build/filebeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cargo.caicloudprivatetest.com/library/filebeat:6.5.4
FROM cargo.caicloud.xyz/library/filebeat:6.5.4

USER root
RUN yum install -y gettext && yum clean all
Expand Down
11 changes: 1 addition & 10 deletions build/log-pilot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
FROM cargo.caicloudprivatetest.com/library/alpine:3.8

# Use aliyun source
RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories
RUN echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories

RUN apk update && \
apk add wget && \
apk add bash && \
rm -rf /var/cache/apk/*
FROM cargo.caicloud.xyz/library/debian:stretch-curl

COPY bin/log-pilot /opt/log-pilot/bin/log-pilot
COPY assets/filebeat/filebeat.tpl /opt/log-pilot
Expand Down
15 changes: 15 additions & 0 deletions release/logging-filebeat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ _config:
path: /var/run/docker.sock
readonly: true
propagation: HostToContainer
- image: '[[ registry_release ]]/beat-exporter:v0.1.2'
imagePullPolicy: Always
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
pod:
annotations:
- key: prometheus.io/port
value: '9479'
- key: prometheus.io/scrape
value: 'true'
type: DaemonSet
volumes:
- name: varlog
Expand Down

0 comments on commit 091d499

Please sign in to comment.