Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Updated snap-config-sample files: added "Notice" to yaml, uniformity …
Browse files Browse the repository at this point in the history
…config values

Renaming snapclt-config-sample.json to snaptel-config-sample.json
  • Loading branch information
IzabellaRaulin committed May 18, 2017
1 parent c6b17c8 commit 04758bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/configs/snap-config-sample.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"log_level":2,
"log_path":"/some/log/dir",
"log_path":"/var/log/snap",
"log_truncate":false,
"log_colors":true,
"gomaxprocs":2,
Expand Down
19 changes: 13 additions & 6 deletions examples/configs/snap-config-sample.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
#
# ** Notice **
# This file is a config file template to present all possibile config paramaters 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.
Expand All @@ -7,7 +13,8 @@ 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.
# 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
Expand Down Expand Up @@ -65,14 +72,14 @@ control:
# 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 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. Snap will not disable a plugin due to failures when this value is -1.
max_plugin_restarts: 10

## Secure plugin communication optional parameters:
# 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
Expand Down Expand Up @@ -107,7 +114,7 @@ control:
influxdb:
all:
server: xyz.local
password: $password
password: password
processor:
movingaverage:
all:
Expand Down Expand Up @@ -164,7 +171,7 @@ restapi:
# port sets the port to start the REST API server on. Default is 8181
port: 8282

# REST API in address[:port] format
# 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.
Expand All @@ -182,7 +189,7 @@ tribe:
bind_port: 16000

# name sets the name to use for this snapteld instance in the tribe
# membership. Default value defaults to local hostname of the system.
# membership. Default value is hostname of the system.
name: localhost

# seed sets the snapteld instance to use as the seed for tribe communications
Expand Down
1 change: 0 additions & 1 deletion mgmt/rest/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func TestRestAPIConfigYaml(t *testing.T) {
So(cfg.RestKey, ShouldEqual, "/etc/snap/cert.key")
})
})

}

func TestRestAPIDefaultConfig(t *testing.T) {
Expand Down

0 comments on commit 04758bc

Please sign in to comment.