-
Notifications
You must be signed in to change notification settings - Fork 1
/
5.heartbeat.yaml
56 lines (53 loc) · 1.48 KB
/
5.heartbeat.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
apiVersion: v1
kind: ConfigMap
metadata:
namespace: kube-system
name: heartbeat-config
labels:
k8s-app: heartbeat
data:
heartbeat.yml: |-
heartbeat.config.monitors:
# Directory + glob pattern to search for configuration files
path: ${path.config}/monitors.d/*.yml
# If enabled, heartbeat will periodically check the config.monitors path for changes
reload.enabled: true
# How often to check for changes
reload.period: 5s
setup.dashboards.enabled: true
setup.kibana:
host: "elk-kibana.kube-elk:5601"
output.elasticsearch:
hosts: ['elasticsearch-client.kube-elk:9200']
heartbeat.monitors:
# https://www.elastic.co/guide/en/beats/heartbeat/6.7/heartbeat-configuration.html
- type: http
urls: ["http://elasticsearch-client.kube-elk:9200", "https://www.naver.com"]
schedule: "@every 10s"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: kube-system
name: heartbeat
spec:
# this replicas value is default
# modify it according to your case
replicas: 1
template:
metadata:
labels:
app: heartbeat
spec:
containers:
- name: heartbeat
image: docker.elastic.co/beats/heartbeat:6.6.0
volumeMounts:
- name: heartbeat-config
mountPath: /usr/share/heartbeat/heartbeat.yml
readOnly: true
subPath: heartbeat.yml
volumes:
- name: heartbeat-config
configMap:
name: heartbeat-config