forked from splunk/splunk-sdk-csharp-pcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIIndex.cs
741 lines (665 loc) · 20.9 KB
/
IIndex.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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
/*
* Copyright 2014 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.
*/
//// TODO:
//// [O] Contracts
//// [O] Documentation
namespace Splunk.Client
{
using System;
using System.Threading.Tasks;
using Splunk.Client.Entities;
/// <summary>
/// Provides an operational interface to Splunk index entities.
/// </summary>
/// <seealso cref="T:IEntity"/>
public interface IIndex : IEntity
{
#region Properties
/// <summary>
/// Gets a value that indicates whether all data from the
/// <see cref= "Index"/> is proper UTF-8.
/// </summary>
/// <remarks>
/// This is a global setting, not a per-index setting.
/// </remarks>
/// <value>
/// <c>true</c> if assure UTF 8, <c>false</c> if not.
/// </value>
bool AssureUTF8
{ get; }
/// <summary>
/// Gets the bloom filter total size kilobytes.
/// </summary>
/// <value>
/// The bloom filter total size kilobytes.
/// </value>
int BloomFilterTotalSizeKB
{ get; }
/// <summary>
/// Gets the bucket rebuild memory hint.
/// </summary>
/// <value>
/// The bucket rebuild memory hint.
/// </value>
string BucketRebuildMemoryHint
{ get; }
/// <summary>
/// Gets the path to the cold databases for the index.
/// </summary>
/// <value>
/// The full pathname of the cold file.
/// </value>
string ColdPath
{ get; }
/// <summary>
/// Gets the absolute path to the cold databases for the index.
/// </summary>
/// <value>
/// The cold path expanded.
/// </value>
string ColdPathExpanded
{ get; }
/// <summary>
/// Gets the maximum size in MB for the cold database to reach before a roll
/// to the frozen archive is triggered.
/// </summary>
/// <value>
/// The cold path maximum data size megabytes.
/// </value>
long ColdPathMaxDataSizeMB
{ get; }
/// <summary>
/// Gets the path to a directory for the frozen archive of an index.
/// </summary>
/// <remarks>
/// This property is an alternative to <see cref= "ColdToFrozenScript"/>. If
/// <see cref="ColdToFrozenDir"/> and <see cref="ColdToFrozenScript"/>
/// are specified, <see cref="ColdToFrozenDir"/> takes precedence. Splunk
/// will automatically put frozen buckets in this directory.
/// </remarks>
/// <value>
/// The cold to frozen dir.
/// </value>
string ColdToFrozenDir
{ get; }
/// <summary>
/// Gets the path to an archiving script for the frozen archive of an index.
/// </summary>
/// <remarks>
/// If your script requires a program to run it (for example, python),
/// specify the program followed by the path. The script must be in
/// <c>$SPLUNK_HOME/bin</c> or one of its subdirectories.
/// </remarks>
/// <value>
/// The cold to frozen script.
/// </value>
string ColdToFrozenScript
{ get; }
/// <summary>
/// Gets the path to an archiving script for the frozen archive of an index.
/// </summary>
/// <remarks>
/// If your script requires a program to run it (for example, python),
/// specify the program followed by the path. The script must be in
/// <c>$SPLUNK_HOME/bin</c> or one of its subdirectories.
/// </remarks>
/// <value>
/// <c>true</c> if compress raw data, <c>false</c> if not.
/// </value>
bool CompressRawData
{ get; }
/// <summary>
/// Gets the total size in megabytes of data stored in the current
/// <see cref="Index"/>.
/// </summary>
/// <remarks>
/// The total includes the size of data in the <see cref="HomePath"/>,
/// <see cref="ColdPath"/>, and <see cref="ThawedPath"/> databases.
/// </remarks>
/// <value>
/// The current database size megabytes.
/// </value>
long CurrentDBSizeMB
{ get; }
/// <summary>
/// Gets the name of the index for input data that does not contain index
/// destination information.
/// </summary>
/// <remarks>
/// If no index destination information is available in the input data, the
/// index shown here is the destination of that data.
/// </remarks>
/// <value>
/// The default database.
/// </value>
string DefaultDatabase
{ get; }
/// <summary>
/// Gets a value that indicates whether the current <see cref="Index"/>
/// is disabled.
/// </summary>
/// <remarks>
/// This value is <c>true</c>, if the current <see cref="Index"/> is disabled;
/// otherwise, <c>false</c>.
/// </remarks>
/// <value>
/// <c>true</c> if disabled, <c>false</c> if not.
/// </value>
bool Disabled
{ get; }
/// <summary>
/// Gets the extensible administration interface properties for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The extensible administration interface properties.
/// </value>
Eai Eai
{ get; }
/// <summary>
/// Gets a value indicating whether the online bucket repair is enabled.
/// </summary>
/// <value>
/// <c>true</c> if enable online bucket repair, <c>false</c> if not.
/// </value>
bool EnableOnlineBucketRepair
{ get; }
/// <summary>
/// Gets a value that indicates if realtime searches are enabled.
/// </summary>
/// <remarks>
/// This is a global setting, not a per-index setting.
/// </remarks>
/// <value>
/// <c>true</c> if enable real time search, <c>false</c> if not.
/// </value>
bool EnableRealTimeSearch
{ get; }
/// <summary>
/// Gets the frozen time period in seconds.
/// </summary>
/// <value>
/// The frozen time period in seconds.
/// </value>
int FrozenTimePeriodInSecs
{ get; }
/// <summary>
/// Gets the path to the hot and warm buckets for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The full pathname of the home file.
/// </value>
string HomePath
{ get; }
/// <summary>
/// Gets the absolute path to the hot and warm buckets for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The home path expanded.
/// </value>
string HomePathExpanded
{ get; }
/// <summary>
/// Gets the maximum size in MB for the hot and warm buckets for the current
/// <see cref="Index"/> to reach.
/// </summary>
/// <value>
/// The home path maximum data size megabytes.
/// </value>
long HomePathMaxDataSizeMB
{ get; }
/// <summary>
/// Gets the number of threads used for indexing.
/// </summary>
/// <value>
/// The index threads.
/// </value>
string IndexThreads
{ get; }
/// <summary>
/// Gets a value that indicates if the current <see cref="Index"/> is an
/// internal index.
/// </summary>
/// <remarks>
/// Internal indexes include, for example, <c>"_audit"</c> and <c>
/// "_internal"</c>.
/// </remarks>
/// <value>
/// <c>true</c> if this object is internal, <c>false</c> if not.
/// </value>
bool IsInternal
{ get; }
/// <summary>
/// Gets a value indicating whether this object is ready.
/// </summary>
/// <value>
/// <c>true</c> if this object is ready, <c>false</c> if not.
/// </value>
bool IsReady
{ get; }
/// <summary>
/// Gets a value indicating whether this object is virtual.
/// </summary>
/// <value>
/// <c>true</c> if this object is virtual, <c>false</c> if not.
/// </value>
bool IsVirtual
{ get; }
/// <summary>
/// Gets the last initialise sequence number.
/// </summary>
/// <value>
/// The last initialise sequence number.
/// </value>
long LastInitSequenceNumber
{ get; }
/// <summary>
/// Gets the last initialise time.
/// </summary>
/// <value>
/// The last initialise time.
/// </value>
long LastInitTime
{ get; }
/// <summary>
/// Gets the maximum bloom backfill bucket age.
/// </summary>
/// <value>
/// The maximum bloom backfill bucket age.
/// </value>
string MaxBloomBackfillBucketAge
{ get; }
/// <summary>
/// Gets the maximum bucket size cache entries.
/// </summary>
/// <value>
/// The maximum bucket size cache entries.
/// </value>
int MaxBucketSizeCacheEntries
{ get; }
/// <summary>
/// Gets the maximum concurrent optimizes.
/// </summary>
/// <value>
/// The maximum concurrent optimizes.
/// </value>
int MaxConcurrentOptimizes
{ get; }
/// <summary>
/// Gets the size of the maximum data.
/// </summary>
/// <value>
/// The size of the maximum data.
/// </value>
string MaxDataSize
{ get; }
/// <summary>
/// Gets the maximum hot buckets.
/// </summary>
/// <value>
/// The maximum hot buckets.
/// </value>
int MaxHotBuckets
{ get; }
/// <summary>
/// Gets the maximum hot idle seconds.
/// </summary>
/// <value>
/// The maximum hot idle seconds.
/// </value>
int MaxHotIdleSecs
{ get; }
/// <summary>
/// Gets the maximum hot span seconds.
/// </summary>
/// <value>
/// The maximum hot span seconds.
/// </value>
int MaxHotSpanSecs
{ get; }
/// <summary>
/// Gets the maximum memory megabytes.
/// </summary>
/// <value>
/// The maximum memory megabytes.
/// </value>
int MaxMemMB
{ get; }
/// <summary>
/// Gets the maximum meta entries.
/// </summary>
/// <value>
/// The maximum meta entries.
/// </value>
int MaxMetaEntries
{ get; }
/// <summary>
/// Gets the groups the maximum running process belongs to.
/// </summary>
/// <value>
/// The maximum running process groups.
/// </value>
int MaxRunningProcessGroups
{ get; }
/// <summary>
/// Gets the maximum running process groups low priority.
/// </summary>
/// <value>
/// The maximum running process groups low priority.
/// </value>
int MaxRunningProcessGroupsLowPriority
{ get; }
/// <summary>
/// Gets the maximum time.
/// </summary>
/// <value>
/// The maximum time.
/// </value>
DateTime MaxTime
{ get; }
/// <summary>
/// Gets the maximum time unreplicated no acks.
/// </summary>
/// <value>
/// The maximum time unreplicated no acks.
/// </value>
int MaxTimeUnreplicatedNoAcks
{ get; }
/// <summary>
/// Gets the maximum time unreplicated with acks.
/// </summary>
/// <value>
/// The maximum time unreplicated with acks.
/// </value>
int MaxTimeUnreplicatedWithAcks
{ get; }
/// <summary>
/// Gets the maximum total data size megabytes.
/// </summary>
/// <value>
/// The maximum total data size megabytes.
/// </value>
int MaxTotalDataSizeMB
{ get; }
/// <summary>
/// Gets the number of maximum warm databases.
/// </summary>
/// <value>
/// The number of maximum warm databases.
/// </value>
int MaxWarmDBCount
{ get; }
/// <summary>
/// Gets the memory pool megabytes.
/// </summary>
/// <value>
/// The memory pool megabytes.
/// </value>
string MemPoolMB
{ get; }
/// <summary>
/// Gets the minimum raw file synchronise seconds.
/// </summary>
/// <value>
/// The minimum raw file synchronise seconds.
/// </value>
string MinRawFileSyncSecs
{ get; }
/// <summary>
/// Gets the minimum time.
/// </summary>
/// <value>
/// The minimum time.
/// </value>
DateTime MinTime
{ get; }
/// <summary>
/// Gets the number of bloom filters that have been created for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The total number of bloom filters.
/// </value>
int NumBloomFilters
{ get; }
/// <summary>
/// Gets the number of hot buckets that have been created for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The total number of hot buckets.
/// </value>
int NumHotBuckets
{ get; }
/// <summary>
/// Gets the number of warm buckets that have been created for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The total number of warm buckets.
/// </value>
int NumWarmBuckets
{ get; }
/// <summary>
/// Gets the partial service meta period.
/// </summary>
/// <value>
/// The partial service meta period.
/// </value>
int PartialServiceMetaPeriod
{ get; }
/// <summary>
/// Gets the process tracker service interval.
/// </summary>
/// <value>
/// The process tracker service interval.
/// </value>
int ProcessTrackerServiceInterval
{ get; }
/// <summary>
/// Gets the quarantine future seconds.
/// </summary>
/// <value>
/// The quarantine future seconds.
/// </value>
int QuarantineFutureSecs
{ get; }
/// <summary>
/// Gets the quarantine past seconds.
/// </summary>
/// <value>
/// The quarantine past seconds.
/// </value>
int QuarantinePastSecs
{ get; }
/// <summary>
/// Gets the raw chunk size bytes.
/// </summary>
/// <value>
/// The raw chunk size bytes.
/// </value>
int RawChunkSizeBytes
{ get; }
/// <summary>
/// Gets the rep factor.
/// </summary>
/// <value>
/// The rep factor.
/// </value>
int RepFactor
{ get; }
/// <summary>
/// Gets the rotate period in seconds.
/// </summary>
/// <value>
/// The rotate period in seconds.
/// </value>
int RotatePeriodInSecs
{ get; }
/// <summary>
/// Gets the service meta period.
/// </summary>
/// <value>
/// The service meta period.
/// </value>
int ServiceMetaPeriod
{ get; }
/// <summary>
/// Gets a value indicating whether the service only as needed.
/// </summary>
/// <value>
/// <c>true</c> if service only as needed, <c>false</c> if not.
/// </value>
bool ServiceOnlyAsNeeded
{ get; }
/// <summary>
/// Gets the service subtask timing period.
/// </summary>
/// <value>
/// The service subtask timing period.
/// </value>
int ServiceSubtaskTimingPeriod
{ get; }
/// <summary>
/// Gets the summary home path expanded.
/// </summary>
/// <value>
/// The summary home path expanded.
/// </value>
string SummaryHomePathExpanded
{ get; }
/// <summary>
/// Gets the list of indexes for the "index missing" warning banner messages
/// are suppressed.
/// </summary>
/// <remarks>
/// This is a global setting, not a per index setting.
/// </remarks>
/// <value>
/// A List of suppress banners.
/// </value>
string SuppressBannerList
{ get; }
/// <summary>
/// Gets a value indicating whether the synchronise.
/// </summary>
/// <value>
/// <c>true</c> if synchronise, <c>false</c> if not.
/// </value>
bool Sync
{ get; }
/// <summary>
/// Gets a value indicating whether the synchronise meta.
/// </summary>
/// <value>
/// <c>true</c> if synchronise meta, <c>false</c> if not.
/// </value>
bool SyncMeta
{ get; }
/// <summary>
/// Gets the path to the resurrected databases for the current
/// <see cref="Index"/>.
/// </summary>
/// <value>
/// The full pathname of the thawed file.
/// </value>
string ThawedPath
{ get; }
/// <summary>
/// Gets the thawed path expanded.
/// </summary>
/// <value>
/// The thawed path expanded.
/// </value>
string ThawedPathExpanded
{ get; }
/// <summary>
/// Gets the throttle check period.
/// </summary>
/// <value>
/// The throttle check period.
/// </value>
int ThrottleCheckPeriod
{ get; }
/// <summary>
/// Gets the number of total events.
/// </summary>
/// <value>
/// The total number of event count.
/// </value>
long TotalEventCount
{ get; }
/// <summary>
/// Gets the full pathname of the statistics home file.
/// </summary>
/// <value>
/// The full pathname of the statistics home file.
/// </value>
string TStatsHomePath
{ get; }
/// <summary>
/// Gets the statistics home path expanded.
/// </summary>
/// <value>
/// The t statistics home path expanded.
/// </value>
string TStatsHomePathExpanded
{ get; }
#endregion
#region Methods
/// <summary>
/// Asynchronously disables the current <see cref="Index"/>.
/// </summary>
/// <remarks>
/// This method uses the POST data/indexes/{name}/disable endpoint to disable
/// the current <see cref="Index"/>.
/// </remarks>
/// <returns>
/// A <see cref="Task"/> representing the operation.
/// </returns>
Task DisableAsync();
/// <summary>
/// Asynchronously enables the current <see cref="Index"/>.
/// </summary>
/// <remarks>
/// This method uses the POST data/indexes/{name}/enable endpoint to enable
/// the current <see cref="Index"/>.
/// </remarks>
/// <returns>
/// A <see cref="Task"/> representing the operation.
/// </returns>
Task EnableAsync();
/// <summary>
/// Asychronously updates the current <see cref="Index"/> with new
/// <see cref="IndexAttributes"/>.
/// </summary>
/// <remarks>
/// This method uses the <a href="http://goo.gl/n3S22S">POST
/// data/indexes/{name} </a> endpoint to update the attributes of the index
/// represented by this instance.
/// </remarks>
/// <param name="attributes">
/// New attributes for the current <see cref="Index"/> instance.
/// </param>
/// <returns>
/// <c>true</c> if the current snapshot was also updated.
/// </returns>
Task<bool> UpdateAsync(IndexAttributes attributes);
#endregion
}
}