This repository was archived by the owner on Sep 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathJobArgs.cs
379 lines (351 loc) · 11.6 KB
/
JobArgs.cs
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
/*
* Copyright 2012 Splunk, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"): you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
namespace Splunk
{
using System;
/// <summary>
/// Extends Args for Job creation setters
/// </summary>
public class JobArgs : Args
{
/// <summary>
/// Sets the auto-cancel frequency check, in seconds. The default is 0.
/// A value of zero means never auto-cancel.
/// </summary>
public int AutoCancel
{
set
{
this["auto_cancel"] = value;
}
}
/// <summary>
/// Sets the auto-finalize counter. When at least these many events have
/// been processed, the job is finalized. The default is 0. A value of
/// zero means no limit.
/// </summary>
public int AutoFinalizeEventCount
{
set
{
this["auto_finalize_ec"] = value;
}
}
/// <summary>
/// Sets the auto-pause frequency check, in seconds. The default is 0.
/// A value of zero means never auto-pause.
/// </summary>
public int AutoPause
{
set
{
this["auto_pause"] = value;
}
}
/// <summary>
/// Sets the inclusive earliest time bounds for the search. Note that
/// although this is a time stamp, it is left as a string in order to
/// support Splunk relative time format, such as "+2d" that specifies
/// two days from now.
/// </summary>
public string EarliestTime
{
set
{
// convert date to string
this["earliest_time"] = value;
}
}
/// <summary>
/// Sets a value indicating whether lookups should be applied to events.
/// The default is true. Specifying true may slow searches significantly
/// depending on the nature of the lookups.
/// </summary>
public bool EnableLookups
{
set
{
this["enable_lookups"] = value;
}
}
/// <summary>
/// Sets the search execution mode. Valid values are from the list,
/// "blocking", "oneshot", "normal".
/// <list type="">
/// <item>If set to normal, runs an asynchronous search.</item>
/// <item>If set to blocking, returns the sid when the job is
/// complete.</item>
/// <item>If set to oneshot, returns results in the same call.</item>
/// </list>
/// The default is normal.
/// </summary>
public string ExecMode
{
set
{
this["exec_mode"] = value;
}
}
/// <summary>
/// Sets a value indicating whether this search should cause (and wait
/// depending on the value of sync_bundle_replication) for bundle
/// synchronization with all search peers. The default is false.
/// </summary>
public bool ForceBundleReplication
{
set
{
this["force_bundle_replication"] = value;
}
}
/// <summary>
/// Sets the search id. If unset, a random ID is generated.
/// </summary>
public string Id
{
set
{
this["id"] = value;
}
}
/// <summary>
/// Sets the exclusive latest time bounds for the search. Note that
/// although this is a time stamp, it is left as a string in order to
/// support Splunk relative time format, such as "+2d" that specifies
/// two days from now.
/// </summary>
public string LatestTime
{
set
{
this["latest_time"] = value;
}
}
/// <summary>
/// Sets the number of events that can be accesible in any given status
/// bucket. When a search is transformed, the maximum number of events
/// to store. Specifically, in all calls, codeoffset+count
/// <= max_count. The default is 1000.
/// </summary>
public int MaxCount
{
set
{
this["max_count"] = value;
}
}
// namespace??
/// <summary>
/// Sets the absolute time for any relative time specifier in the
/// search. Defaults to the current system time. Note that although
/// this is a time stamp, it is left as a string in order to support
/// Splunk relative time format, such as "+2d" that specifies two days
/// from now.
/// </summary>
public string Now
{
set
{
this["now"] = value;
}
}
/// <summary>
/// Sets the MapReduce reduce phase on accumulated map values frequency,
/// in seconds.
/// </summary>
public int ReduceFreq
{
set
{
this["reduce_freq"] = value;
}
}
/// <summary>
/// Sets a value indicating whether to reload macro definitions from
/// macros.conf. The default is true.
/// </summary>
public bool ReloadMacros
{
set
{
this["reload_macros"] = value;
}
}
/// <summary>
/// Sets the list of (possibly wildcarded) servers from which raw events
/// should be pulled. This same server list is to be used in
/// subsearches. This list is a comma-separated list. The default is an
/// empty list.
/// </summary>
public string RemoteServerList
{
set
{
this["remote_server_list"] = value;
}
}
/// <summary>
/// Sets the list of required fields returned in the search.
/// </summary>
public string[] Rf
{
set
{
this["rf"] = value;
}
}
/// <summary>
/// Sets a value indicating whether the indexer blocks if the queue for
/// this search is full. This only applies to real-time searches. The
/// default is false.
/// </summary>
public bool RtBlocking
{
set
{
this["rt_blocking"] = value;
}
}
/// <summary>
/// Sets a value indicating whether the indexer prefilters the events.
/// This only applies to real-time searches. The default is true.
/// </summary>
public bool RtIndexfilter
{
set
{
this["rt_indexfilter"] = value;
}
}
/// <summary>
/// Sets the maximum time to block, in seconds. This only applies to
/// real-time searches and when rt_blocking is true. The default is 60.
/// </summary>
public int RtMaxblockSeconds
{
set
{
this["rt_maxblocksecs"] = value;
}
}
/// <summary>
/// Sets the queue size, in number of events, the indexer should use for
/// this search. This only applies for real-time searches. The default
/// is 10,000.
/// </summary>
public int RtQueueSize
{
set
{
this["rt_queue_size"] = value;
}
}
/// <summary>
/// Sets a search state listener with the search. The format of this
/// string is:
/// <para>
/// search_state;results_condition;http_method;uri;
/// </para>
/// For example:
/// <example>
/// "onResults;true;POST;/servicesNS/admin/search/saved/search/foobar/notify;"
/// </example>
/// </summary>
public string SearchListener
{
set
{
this["search_listener"] = value;
}
}
/// <summary>
/// Sets the search mode. Valid values are "normal" and "realtime".
/// If set to realtime, search runs over live data. A realtime search
/// may also be indicated by earliest_time and latest_time variables
/// starting with 'rt' even if the search_mode is set to normal or is
/// unset. For a real-time search, if both earliest_time and latest_time
/// are both exactly 'rt', the search represents all appropriate live
/// data received since the start of the search. Additionally, if
/// earliest_time and/or latest_time are 'rt' followed by a relative
/// time specifiers then a sliding window is used where the time bounds
/// of the window are determined by the relative time specifiers and are
/// continuously updated based on the wall-clock time.
/// </summary>
public string SearchMode
{
set
{
this["search_mode"] = value;
}
}
/// <summary>
/// Sets a value indicating whether the search should run in a separate
/// spawned process. The default is true. Note: searches against indexes
/// must run in a separate process.
/// </summary>
public bool SpawnProcess
{
set
{
this["spawn_process"] = value;
}
}
/// <summary>
/// Sets the maximum number of buckets to create. A value of zero causes
/// no timeline information to be generated. The default is 0.
/// </summary>
public int StatusBuckets
{
set
{
this["status_buckets"] = value;
}
}
/// <summary>
/// Sets a value indicating whether this search should wait for bundle
/// replication to complete.
/// </summary>
public bool SyncBundleReplication
{
set
{
this["sync_bundle_replication"] = value;
}
}
/// <summary>
/// Sets the time format string, sed to convert a formatted time string
/// from {start,end}_time into UTC seconds. It defaults to ISO-8601.
/// </summary>
public string TimeFormat
{
set
{
this["time_format"] = value;
}
}
/// <summary>
/// Sets the number of seconds to keep this search after processing has
/// stopped. The default is 86400 (24 hours).
/// </summary>
public int Timeout
{
set
{
this["timeout"] = value;
}
}
}
}