-
Notifications
You must be signed in to change notification settings - Fork 19
/
agent.yaml.sample
127 lines (113 loc) · 5.02 KB
/
agent.yaml.sample
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# vim: ft=yaml
# pid defines the path to pid file.
# This option is not required as the default value is "/tmp/agent.pid".
pid: /tmp/agent.pid
# core defines the address of eru-core component.
# This option is not required as the default value is "127.0.0.1:5001".
core:
- 127.0.0.1:5001
- 127.0.0.1:5002
# heartbeat_interval defines the interval for eru-agent to
# report health status of the node to eru-core.
# If you don't want eru-agent to report this status, set it to 0.
# The default value of this option is 60.
heartbeat_interval: 120
# check_only_mine defines check agent itself or not
# The default value is false
check_only_mine: false
# store defines the type of core service.
# This option is not required as the default value is "grpc".
store: grpc
# runtime defines the type of runtime.
# This option is not required as the default value is "docker".
runtime: docker
# auth defines the authentication values for eru-core.
#
# auth.username and auth.password are the username and password required by eru-core.
# If eru-core doesn't require authentication, you can remove this option.
auth:
username: username
password: password
# docker defines docker config.
#
# docker.endpoint is the url that eru-agent will use to connect to.
# This URL can be a tcp address like "tcp://10.233.10.14:2376",
# or a unix socket file path like "unix:///var/run/docker/sock",
# Note that this endpoint is usually the API URL of docker on local machine.
docker:
endpoint: unix:///var/run/docker.sock
# yavirt defines yavirt config
#
# yavirt.endpoint is the url that eru-agent will use to connect to.
# Workloads whose names match one of yavirt.skip_guest_report_regexps will not be checked by eru-agent.
# This URL can be a grpc address like "grpc://127.0.0.1:9697",
# Note that this endpoint is usually the API URL of docker on local machine.
yavirt:
endpoint: grpc://127.0.0.1:9697
skip_guest_report_regexps:
- .+002
# metrics defines where should eru-agent send metrics of containers to.
#
# metrics.step defines the interval of collecting metrics action. eru-agent
# will collect metrics every `metrics.step` seconds. The default value is 10.
#
# metrics.transfers defines where eru-agent will send metrics to.
# Currently it supports Statsd and Prometheus. The default value is empty,
# which means eru-agent will not send metrics.
metrics:
step: 30
transfers:
- 127.0.0.1:8125
# api defines the API interface for eru-agent.
#
# api.addr defines the address of HTTP API service.
# API provides these APIs:
# - /profile/, will do pprof for eru-agent process and return the statistics;
# - /version/, will return the version of this eru-agent instance;
# - /log/?app=$APPNAME, will return the log stream of corresponding app;
# - /metrics/, default metrics handler for Prometheus to collect.
# If you don't need any of the functions above, you can remove this option,
# then eru-agent will not provide HTTP API service.
api:
addr: 127.0.0.1:12345
# log defines where should eru-agent forward logs of containers to.
#
# log.forwards defines the targets.
# Currently we support these kinds of targets:
# - tcp stream, like rsyslog with tcp protocol, e.g. "tcp://127.0.0.1:5144";
# - udp stream, like rsyslog with udp protocol, e.g. "udp://127.0.0.1:5144";
# - journald, e.g. "journal://".
#
# log.stdout defines whether eru-agent will also write log to STDOUT
# while forwarding to remote logging facility.
# The default value is false if you don't define this option.
# Which means you can check the log of containers in remote logging facility,
# but you can't see the log of containers in eru-agent's log.
log:
forwards:
- tcp://127.0.0.1:5144
stdout: false
# healthcheck defines how eru-agent does healthcheck.
#
# healthcheck.interval defines the interval for eru-agent to check health status of all containers.
# The default value is 60, which means every 60 seconds, eru-agent will check health status of all
# containers, and report these data to eru-core. If these data should expire, the time to expire
# will be 2.5 * healthcheck.interval, in case that eru-agent failed to report for current round
# but succeeded to report in next round. E.g. if you set healthcheck.interval to 60, the TTL will be
# 2.5 * 60 = 150 (in seconds).
#
# healthcheck.timeout defines the timeout for eru-agent to check health status.
# eru-agent will connect to the port container publishes and then check (either layer-2 connectivity or layer-7 application provided scenarios),
# timeout is used for this connection and check. The default value is 10 (in seconds).
#
# healthcheck.cache_ttl defines how long will eru-agent cache an unchanged status locally.
# This is only used when selfmon mode is switched on. The default value is 300 (in seconds).
healthcheck:
interval: 120
timeout: 10
cache_ttl: 300
# global_connection_timeout defines the timeout for eru-agent other than healthcheck.
# E.g. the timeout for reporting action of eru-agent, or the timeout for eru-agent to
# connect to docker.
# The default value is "5s", note that "s" in the end.
global_connection_timeout: 15s