-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig
More file actions
228 lines (136 loc) · 5.09 KB
/
config
File metadata and controls
228 lines (136 loc) · 5.09 KB
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# Youbeda configuration
{
############################## Basic section ################################
### Debug mode - maximum verbosity (disabled by default)
'debug' => 0,
### Quiet mode - no output at all (disabled by default)
### NOTE: debug mode has higher priority
'quiet' => 0,
### File to store cache
'state_file' => '/var/lib/youbeda/state',
### Format in ANSI C standard to output all dates and times
'time_format' => '%Y-%m-%d %H:%M:%S',
### Format for mail / jabber messages' subject
### Placeholders: VEID, resource name
'subject_format' => 'VPS %d: %s failcnt increased!',
### Format for mail / jabber message
### Placeholders: date and time, VEID, hostname, resource name,
### old failcnt value, new failcnt value
'message_format' => '%s: CT %s on %s: %s failcnt changed from %s to %s.',
# VEID of VPS to skip (Perl-compatible regular expression)
'disallowed_vps_regex' => '',
# Complete hostname (Perl-compatible regular expression)
'complete_hostname_regex' => '.+',
# Suffix to add to hostname if it's not complete
'hostname_suffix' => '.example.com',
########################## end of basic section #############################
############################# Output section ################################
'output' => {
'log' => {
### Enable output to logfile
'enabled' => 0,
### Logfile name
'logfile' => '/var/log/youbeda/youbeda.log'
},
'console' => {
### Enable output to STDOUT
'enabled' => 0,
},
'syslog' => {
### Enable output to syslog
'enabled' => 1,
### Ident
'ident' => 'youbeda',
### Facility
'facility' => 'daemon'
}
},
########################## end of output section ############################
################### List of actions on failcnt increase #####################
'actions' => {
######################## Limits adjustment action ###########################
'adjust' => {
### Enable limits adjustments
'enabled' => 0,
### Command to change VPS limits
'command' => '/usr/sbin/vzctl',
### VEID of VPS to adjust (Perl-compatible regular expression)
'allowed_vps_regex' => '.+',
### Relative adjustment
'adjustment' => 0.1,
### Should adjustments be saved (with --save flag) or not
'save_changes' => 0,
},
######################### End of limits adjustment ##########################
############################ Send email action ##############################
'email' => {
### Enable sending message on email
'enabled' => 0,
### What email to use in From: field
'from' => 'youbeda@example.com',
### Emails to send messages to (as an array or as a string)
'to' => 'admin@example.com',
### Message charset (default: ISO-8859-1)
'charset' => 'KOI8-R'
},
######################### end of send email action ##########################
############################## DB log action ################################
'db' => {
### Enable events logging to SQL database
'enabled' => 0,
### SQL database table name to store data to
'stats_table' => 'stats',
### SQL database connection parameters
'connection' => { 'host' => 'localhost',
'driver' => 'mysql', # DBI driver name
'port' => 3306,
'database' => 'youbeda-db',
'username' => 'youbeda-user',
'password' => 'youbeda-password'
}
},
######################## end of DB logging action ###########################
############################# SQLite action #################################
'sqlite' => {
### Enable writing messages to SQLite database
'enabled' => 0,
### SQLite database table name to store data to
'stats_table' => 'stats',
### Path to SQLite database (database will be created if not exists)
'db' => '/var/lib/youbeda/youbeda.db'
},
########################## end of SQLite action #############################
############################ SQL dump action ################################
'sqldump' => {
### Enable writing SQL requests to dump
'enabled' => 0,
### Database table name to store data to
'stats_table' => 'stats',
### Path to dump file
'filename' => '/var/log/youbeda/dump.sql.log',
### Should the dump be piped? (i.e. printing to stdin of other command instead
### of ordinary file)
'is_pipe' => 0
},
######################### end of SQL dump action ############################
############################# Jabber action #################################
'jabber' => {
### Enable sending messages to Jabber
'enabled' => 0,
### JIDs to send messages to (as an array or as a string)
'to' => [ 'user1@jabber.example.com',
'user2@jabber.example.com' ],
### Jabber connection parameters
'connection' => { 'hostname' => 'jabber.example.com',
'username' => 'youbeda-bot',
'password' => 'youbeda-bot-password',
'resource' => 'Youbeda',
'tls' => 1, # use TLS?
'port' => 5222,
'register' => 0 # register new account?
}
}
########################## end of Jabber action #############################
}
########################## end of actions list ##############################
};