-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathexample-maestro.config
127 lines (127 loc) · 4.17 KB
/
example-maestro.config
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
unixLogSocket: /tmp/greaseLog.sock
sysLogSocket: /dev/log
apiUnixDgramSocket: /tmp/maestro.sock
httpUnixSocket: /tmp/maestroapi.sock
clientId: WWRL000001
symphony: # symphony system management APIs
client_cert: ""
client_key: ""
url: "https://devcloud.wigwag.io"
var_defs:
- key: "WIGWAG_DIR"
value: "/wigwag"
- key: "NODE_EXEC"
value: "/bin/node"
stats:
interval: 5 # frequency in seconds - default 300
check_mem: true # default true
check_mem_pace: 1 # means check every interval (default is 1 - every interval)
targets:
- file: /tmp/maestro.log
rotate:
max_files: 10
max_file_size: 10000
max_total_size: 100000
rotate_on_start: true
delim: "\n"
format_time: "[%ld:%d] "
format_level: "<%s> "
format_tag: "{%s} "
format_origin: "(%s) "
filters:
- levels: all
format_pre: "asas"
# JSON file
- file: /tmp/json-maestro.log
rotate:
max_files: 10
max_file_size: 10000
max_total_size: 100000
rotate_on_start: true
delim: "],\n"
format_time: "{\"time\":\"%ld:%d\"}, "
format_level: "{\"level\":\"%s\"}, "
format_tag: "{\"tag\":\"%s\"}, "
format_origin: "{\"origin\":\"%s\"}, "
format_pre_msg: "{ \"msg\":\""
format_post: "\"}"
flag_json_escape_strings: true
filters:
- levels: all
format_pre: "[" # you will wrap this output with { "log": [ OUTPUT ] }
# format_post: "]}" # I am not sure if this works
- name: "toCloud" # this is a special target for sending to the cloud. It must send as a JSON
format_time: "\"time\":\"%ld:%d\", "
format_level: "\"level\":\"%s\", "
format_tag: "\"tag\":\"%s\", "
format_origin: "\"origin\":\"%s\", "
format_pre_msg: "\"msg\":\""
format_post: "\"}"
flag_json_escape_strings: true
filters:
- levels: all
format_pre: "{" # you will wrap this output with { "log": [ OUTPUT ] }
container_templates:
- name: "deviceJS_process"
cgroup: # will implement later
mem_limit: 10000000
inherit_env: true
add_env:
- "NODE_PATH=${WIGWAG_DIR}"
exec_cmd: "node" # will use PATH if not absolute path (as per execvp())
exec_pre_args:
- "--max-executable-size=96"
- "--max-old-space-size=128"
- "--max-semi-space-size=1"
- "deviceJSContainer"
# exec_post_args:
- name: "node_process"
cgroup: # will implement later
mem_limit: 10000000
exec_cmd: "node {{CMD}}" # {{CMD}} will be filled in by the exec_cmd field below
exec_pre_args:
- "--max-executable-size=96"
- "--max-old-space-size=128"
- "--max-semi-space-size=1"
- "deviceJSContainer"
jobs:
- job: "devicejs"
exec_cmd: "node {{CMD}}" # {{CMD}} will be filled in by the exec_cmd field below
exec_args:
- "--max-executable-size=96"
- "--max-old-space-size=128"
- "--max-semi-space-size=1"
- "devicejs"
- job: "core_modules"
container_template: "deviceJS_process"
message: |
"path" : "${thisdir}/../AppServer",
"config": {}
},
{
"path" : "${thisdir}/../APIProxy",
"config": {}
},
{
"path" : "${thisdir}/../core-lighting",
"config": {}
}
# {
# "path" : "${thisdir}/../UPnP",
# "config": {}
# },
restart: true
restart_limit: 5000
restart_pause: 100 # 100 seconds between restarts
- job: "support_tunnel"
depends_on: # these services must be running first
- "devicejs"
# - "core_modules"
restart_on_dependency_fail: true # kill the process and restart it if it's dependencies fail
no_autostart: false # don't start it when maestro starts. But the job is available for start
container_template: "node_process"
exec_cmd: "/wigwag/support.js"
exec_args:
- "some arg"
#
# - tty: sometty