forked from intelsdi-x/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snap-config-sample.yaml
196 lines (162 loc) · 6.92 KB
/
snap-config-sample.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
---
#
# ** Notice **
# This file is a config file template to present all possible config parameters to customize.
# Before you use this config file, please adjust it to your use case.
#
# log_level for the snap daemon. Supported values are
# 1 - Debug, 2 - Info, 3 - Warning, 4 - Error, 5 - Fatal.
# Default value is 3.
log_level: 2
# log_path sets the path for logs for the snap daemon. By
# default snapteld prints all logs to stdout. Any provided
# path will send snapteld logs to a file called snapteld.log in
# the provided directory. By default log path is empty
# and snapteld logs to stdout.
log_path: /var/log/snap
# log_truncate specifies how the log file with be opened
# false => append (default)
# true => truncate
log_truncate: false
# log_colors specifies if log file output is colorified
# false => no colors (default)
# true => colors
log_colors: true
# Gomaxprocs sets the number of cores to use on the system
# for snapteld to use. Default for gomaxprocs is 1
gomaxprocs: 2
# Control sections for configuration settings for the plugin
# control module of snapteld.
control:
# auto_discover_path sets the directory(s) to auto load plugins and tasks on
# the start of the snap daemon. This can be a colon separated list of directories.
auto_discover_path: /opt/snap/plugins:/opt/snap/tasks
# cache_expiration sets the time interval for the plugin cache to use before
# expiring collection results from collect plugins. Default value is 500ms
cache_expiration: 750ms
# listen_addr is the bind address for the control rpc server. Default address
# is 127.0.0.1
listen_addr: 0.0.0.0
# listen_port is the bind port for the control rpc server. Default port is
# 8082.
listen_port: 10082
# max_running_plugins sets the size of the available plugin pool for each
# plugin loaded in the system. Default value is 3
max_running_plugins: 1
# plugin_load_timeout sets the maximal time allowed for a plugin to load
# Default value is 3
plugin_load_timeout: 10
# keyring_paths sets the directory(s) to search for keyring files for signed
# plugins. This can be a comma separated list of directories
keyring_paths: /etc/snap/keyrings
# plugin_trust_level sets the plugin trust level for snapteld. The default state
# for plugin trust level is enabled (1). When enabled, only signed plugins that can
# be verified will be loaded into snapteld. Signatures are verifed from
# keyring files specided in keyring_path. Plugin trust can be disabled (0) which
# will allow loading of all plugins whether signed or not. The warning state allows
# for loading of signed and unsigned plugins. Warning messages will be displayed if
# an unsigned plugin is loaded. Any signed plugins that can not be verified will
# not be loaded. Valid values are 0 - Off, 1 - Enabled, 2 - Warning
plugin_trust_level: 0
# temp_dir_path sets the temporary directory which houses the temporary files
temp_dir_path: /tmp
# max_plugin_restarts controls how many times a plugin is allowed to be restarted before failing.
# By default it is 10 times. Snap will not disable a plugin due to failures when this value is -1.
max_plugin_restarts: 10
# Secure plugin communication optional parameters:
# tls_cert_path sets the TLS certificate path to enable secure plugin communication
# and authenticate itself to plugins. Requires also: tls_key_path.
tls_cert_path: /tmp/snaptest-cli.crt
# tls_key_path sets the TLS key path to enable secure plugin communication and
# authenticate itself to plugins. Requires also: tls_cert_path.
tls_key_path: /tmp/snaptest-cli.key
# ca_cert_paths sets the list of filesystem paths (files/directories) to CA certificates
# for use in validating
ca_cert_paths: /tmp/small-setup-ca.crt:/tmp/medium-setup-ca.crt:/tmp/ca-certs/
# plugins section contains plugin config settings that will be applied for
# plugins across tasks.
plugins:
all:
password: p@ssw0rd
collector:
all:
user: jane
pcm:
all:
path: /usr/local/pcm/bin
versions:
1:
user: john
someint: 1234
somefloat: 3.14
somebool: true
psutil:
all:
path: /usr/local/bin/psutil
publisher:
influxdb:
all:
server: xyz.local
password: password
processor:
movingaverage:
all:
user: jane
versions:
1:
user: tiffany
password: new password
# tags section contains global tags that will be applied on collected metrics
# across tasks.
tags:
/intel/psutil:
datacenter: rennes
# tags all metrics
/:
country: france
# scheduler configuration settings contains all settings for scheduler
# module
scheduler:
# work_manager_queue_size sets the size of the worker queue inside snapteld scheduler.
# Default value is 25.
work_manager_queue_size: 10
# work_manager_pool_size sets the size of the worker pool inside snapteld scheduler.
# Default value is 4.
work_manager_pool_size: 2
# rest sections contains all the configuration items for the REST API server.
restapi:
# enable controls enabling or disabling the REST API for snapteld. Default value is enabled.
enable: true
# https enables HTTPS for the REST API. If no default certificate and key are provided, then
# the REST API will generate a private and public key to use for communication. Default
# value is false
https: true
# rest_auth enables authentication for the REST API. Default value is false
rest_auth: true
# rest_auth_password sets the password to use for the REST API. Currently user and password
# combinations are not supported.
rest_auth_password: changeme
# rest_certificate is the path to the certificate to use for REST API when HTTPS is also enabled.
rest_certificate: /etc/snap/cert.pem
# rest_key is the path to the private key for the certificate in use by the REST API
# when HTTPs is enabled.
rest_key: /etc/snap/cert.key
# port sets the port to start the REST API server on. Default is 8181
port: 8282
# REST API in address[:port] format to bind to/listen on. Default is an empty string => listen on all interfaces
addr: 127.0.0.1:12345
# corsd sets the cors allowed domains in a comma separated list. It is the same origin if it's empty.
allowed_origins: http://127.0.0.1:88888, https://snap-telemetry.io
# tribe section contains all configuration items for the tribe module
tribe:
# enable controls enabling tribe for the snapteld instance. Default value is false.
enable: true
# bind_addr sets the IP address for tribe to bind.
bind_addr: 127.0.0.1
# bind_port sets the port for tribe to listen on. Default value is 6000
bind_port: 16000
# name sets the name to use for this snapteld instance in the tribe
# membership. Default value is hostname of the system.
name: localhost
# seed sets the snapteld instance to use as the seed for tribe communications
seed: 1.1.1.1:16000