forked from riptano/logparse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystemlog.py
1481 lines (1101 loc) · 75.8 KB
/
systemlog.py
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
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from rules import *
def sstables(value):
return [sstable[20:-2] for sstable in value.split(', ')]
def fix_solr_exception(fields):
fields['exception'] = fields['message'] + fields['exception']
fields['message'] = ''
capture_message = switch((
case('CassandraDaemon'),
rule(
capture(r'Logging initialized'),
update(event_product='cassandra', event_category='startup', event_type='node_restart')),
rule(
capture(r'JVM vendor/version: (?P<jvm>.*)'),
update(event_product='cassandra', event_category='startup', event_type='jvm_vendor')),
rule(
capture(r'Heap size: (?P<heap_used>[0-9]*)/(?P<total_heap>[0-9]*)'),
convert(int, 'heap_used', 'total_heap'),
update(event_product='cassandra', event_category='startup', event_type='heap_size')),
rule(
capture(r'Classpath: (?P<classpath>.*)'),
convert(split(':'), 'classpath'),
update(event_product='cassandra', event_category='startup', event_type='classpath')),
rule(
capture(r'JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info.'),
update(event_product='cassandra', event_category='startup', event_type='jmx_remote_disabled')),
rule(
capture(r'No gossip backlog; proceeding'),
update(event_product='cassandra', event_category='startup', event_type='gossip_backlog_done')),
rule(
capture(r'Waiting for gossip to settle before accepting client requests...'),
update(event_product='cassandra', event_category='startup', event_type='gossip_wait')),
rule(
capture(r'completed pre-loading \((?P<keys_loaded>[0-9]*) keys\) key cache.'),
update(event_product='cassandra', event_category='startup', event_type='preload_keycache')),
rule(
capture(r'Waiting for gossip to settle before accepting client requests...'),
update(event_product='cassandra', event_category='startup', event_type='gossip_settling')),
rule(
capture(r'Cassandra shutting down...'),
update(event_product='cassandra', event_category='shutdown', event_type='begin_shutdown')),
rule(
capture(r'Hostname: (?P<hostname>.*)'),
update(event_product='cassandra', event_category='startup', event_type='hostname')),
rule(
capture(r'(?P<memory_type>.*) memory: init = (?P<memory_init>[0-9]*)\([0-9]*K\) used = (?P<memory_used>[0-9]*)\([0-9]*K\) committed = (?P<memory_committed>[0-9]*)\([0-9]*K\) max = (?P<memory_max>[0-9-]*)\([0-9-]*K\)'),
convert(int, 'memory_init', 'memory_used', 'memory_committed', 'memory_max'),
update(event_product='cassandra', event_category='startup', event_type='memory_size')),
rule(
capture(r'Exception in thread Thread\[(?P<exception_thread>[^\]]*)\]'),
update(event_product='cassandra', event_category='error', event_type='exception')),
case('DseConfig', 'DseSearchConfig'),
rule(
capture(r'Load of settings is done.'),
update(event_product='cassandra', event_category='startup', event_type='dse_settings_done')),
rule(
capture(r'(?P<feature>.*) (is|are) enabled'),
update(event_product='cassandra', event_category='startup', event_type='dse_feature', enabled=True)),
rule(
capture(r'(?P<feature>.*) (is|are) not enabled'),
update(event_product='cassandra', event_category='startup', event_type='dse_feature', enabled=False)),
case('DseModule'),
rule(
capture(r'Using regular cql queries'),
update(event_product='dse', event_category='startup', event_type='solr_cql_queries', enabled=False)),
rule(
capture(r'Using Solr-enabled cql queries'),
update(event_product='dse', event_category='startup', event_type='solr_cql_queries', enabled=True)),
rule(
capture(r'CFS operations enabled'),
update(event_product='dse', event_category='startup', event_type='cfs_operations', enabled=True)),
rule(
capture(r'CFS operations disabled. Install the dse-analytics module if needed.'),
update(event_product='dse', event_category='startup', event_type='cfs_operations', enabled=False)),
rule(
capture(r'Loading DSE module'),
update(event_product='dse', event_category='startup', event_type='load_dse_module')),
case('DseDaemon'),
rule(
capture(r'(?P<component>[A-Za-z ]*) versions?: (?P<version>.*)'),
update(event_product='dse', event_category='startup', event_type='component_version')),
rule(
capture(r'Waiting for other nodes to become alive...'),
update(event_product='dse', event_category='startup', event_type='wait_other_nodes')),
rule(
capture(r'Wait for nodes completed'),
update(event_product='dse', event_category='startup', event_type='wait_other_nodes_complete')),
rule(
capture(r'DSE shutting down...'),
update(event_product='dse', event_category='shutdown', event_type='dse_shutdown')),
rule(
capture(r'The following nodes seems to be down: \[(?P<endpoints>[^\]]*)\]. Some Cassandra operations may fail with UnavailableException.'),
update(event_product='dse', event_category='gossip', event_type='down_nodes_warning')),
case('CqlSlowLogWriter'),
rule(
capture(r'Recording statements with duration of (?P<duration>[0-9]+) in slow log'),
convert(int, 'duration'),
update(event_product='dse', event_category='cql', event_type='slow_query')),
case('GCInspector'),
rule(
capture(r'Heap is (?P<percent_full>[0-9.]*) full.*'),
convert(percent, 'percent_full'),
update(event_product='cassandra', event_category='garbage_collection', event_type='heap_full')),
rule(
capture(r'GC for (?P<gc_type>[A-Za-z]*): (?P<duration>[0-9]*) ms for (?P<collections>[0-9]*) collections, (?P<used>[0-9]*) used; max is (?P<max>[0-9]*)'),
convert(int, 'duration', 'collections', 'used', 'max'),
update(event_product='cassandra', event_category='garbage_collection', event_type='pause')),
rule(
capture(r'(?P<gc_type>[A-Za-z]*) GC in (?P<duration>[0-9]*)ms. (( CMS)? Old Gen: (?P<oldgen_before>[0-9]*) -> (?P<oldgen_after>[0-9]*);)?( Code Cache: (?P<codecache_before>[0-9]*) -> (?P<codecache_after>[0-9]*);)?( Compressed Class Space: (?P<compressed_class_before>[0-9]*) -> (?P<compressed_class_after>[0-9]*);)?( CMS Perm Gen: (?P<permgen_before>[0-9]*) -> (?P<permgen_after>[0-9]*);)?( Metaspace: (?P<metaspace_before>[0-9]*) -> (?P<metaspace_after>[0-9]*);)?( Par Eden Space: (?P<eden_before>[0-9]*) -> (?P<eden_after>[0-9]*);)?( Par Survivor Space: (?P<survivor_before>[0-9]*) -> (?P<survivor_after>[0-9]*))?'),
convert(int, 'duration', 'oldgen_before', 'oldgen_after', 'permgen_before', 'permgen_after', 'codecache_before', 'codecache_after', 'compressed_class_before', 'compressed_class_after', 'metaspace_before', 'metaspace_after', 'eden_before', 'eden_after', 'survivor_before', 'survivor_after'),
update(event_product='cassandra', event_category='garbage_collection', event_type='pause')),
rule(
capture(r'(?P<gc_type>.+) Generation GC in (?P<duration>[0-9]+)ms. (Compressed Class Space: (?P<compressed_class_before>[0-9]+) -> (?P<compressed_class_after>[0-9]+);)?.((.+) Eden Space: (?P<eden_before>[0-9]+) -> (?P<eden_after>[0-9]+);)?.((.+) Old Gen: (?P<oldgen_before>[0-9]+) -> (?P<oldgen_after>[0-9]+);)?.((.+) Survivor Space: (?P<survivor_before>[0-9]+) -> (?P<survivor_after>[0-9]+);)?.(Metaspace: (?P<metaspace_before>[0-9]+) -> (?P<metaspace_after>[0-9]+))?'),
convert(int, 'duration', 'oldgen_before', 'oldgen_after', 'permgen_before', 'permgen_after', 'compressed_class_before', 'compressed_class_after', 'metaspace_before', 'metaspace_after', 'eden_before', 'eden_after', 'survivor_before', 'survivor_after'),
update(event_product='cassandra', event_category='garbage_collection', event_type='pause')),
case('ColumnFamilyStore'),
rule(
capture(
r'Enqueuing flush of Memtable-(?P<table>[^@]*)@(?P<hash_code>[0-9]*)\((?P<serialized_bytes>[0-9]*)/(?P<live_bytes>[0-9]*) serialized/live bytes, (?P<ops>[0-9]*) ops\)',
r'Enqueuing flush of (?P<table>[^:]*): (?P<on_heap_bytes>[0-9]*) \((?P<on_heap_limit>[0-9]*)%\) on-heap, (?P<off_heap_bytes>[0-9]*) \((?P<off_heap_limit>[0-9]*)%\) off-heap'),
convert(int, 'hash_code', 'serialized_bytes', 'live_bytes', 'ops', 'on_heap_bytes', 'off_heap_bytes', 'on_heap_limit', 'off_heap_limit'),
update(event_product='cassandra', event_category='memtable', event_type='enqueue_flush')),
rule(
capture(r'Initializing (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='cassandra', event_category='startup', event_type='table_init')),
rule(
capture(r'Unable to cancel in-progress compactions for (?P<table>[^.]*)\. Perhaps there is an unusually large row in progress somewhere, or the system is simply overloaded\.'),
update(event_product='cassandra', event_category='compaction', event_type='cancellation_failed')),
rule(
capture(r"Flushing largest CFS\(Keyspace='(?P<keyspace>[^']*)', ColumnFamily='(?P<table>[^']*)'\) to free up room. Used total: (?P<used_on_heap>\d+\.\d+)/(?P<used_off_heap>\d+\.\d+), live: (?P<live_on_heap>\d+\.\d+)/(?P<live_off_heap>\d+\.\d+), flushing: (?P<flushing_on_heap>\d+\.\d+)/(?P<flushing_off_heap>\d+\.\d+), this: (?P<this_on_heap>\d+\.\d+)/(?P<this_off_heap>\d+\.\d+)"),
convert(float, 'used_on_heap', 'used_off_heap', 'live_on_heap', 'live_off_heap', 'flushing_on_heap', 'flushing_off_heap', 'this_on_heap', 'this_off_heap'),
update(event_product='cassandra', event_category='memtable', event_type='flush_largest')),
rule(
capture(
r"Flushing SecondaryIndex (?P<index_type>[^{]*)\{(?P<index_metadata>[^}]*)\}",
r"Flushing SecondaryIndex (?P<index_class>[^@]*)@(?P<index_hash>.*)"),
update(event_product='cassandra', event_category='secondary_index', event_type='flush')),
case('Memtable', 'ColumnFamilyStore'),
rule(
capture(
r'Writing Memtable-(?P<table>[^@]*)@(?P<hash_code>[0-9]*)\(((?P<serialized_bytes>[0-9]*)|(?P<serialized_kb>[0-9.]*)KiB|(?P<serialized_mb>[0-9.]*)MiB) serialized bytes, (?P<ops>[0-9]*) ops, (?P<on_heap_limit>[0-9]*)%/(?P<off_heap_limit>[0-9]*)% of on/off-heap limit\)',
r'Writing Memtable-(?P<table>[^@]*)@(?P<hash_code>[0-9]*)\((?P<serialized_bytes>[0-9]*)/(?P<live_bytes>[0-9]*) serialized/live bytes, (?P<ops>[0-9]*) ops\)'),
convert(int, 'hash_code', 'serialized_bytes', 'live_bytes', 'ops', 'on_heap_limit', 'off_heap_limit'),
convert(float, 'serialized_kb'),
update(event_product='cassandra', event_category='memtable', event_type='begin_flush')),
rule(
capture(
r'Completed flushing (?P<filename>[^ ]*) \(((?P<file_size_mb>[0-9.]*)MiB|(?P<file_size_kb>[0-9.]*)KiB|(?P<file_size_bytes>[0-9]*) bytes)\) for commitlog position ReplayPosition\(segmentId=(?P<segment_id>[0-9]*), position=(?P<position>[0-9]*)\)',
r'Completed flushing; nothing needed to be retained. Commitlog position was ReplayPosition\(segmentId=(?P<segment_id>[0-9]*), position=(?P<position>[0-9]*)\)'),
convert(int, 'file_size_bytes', 'segment_id', 'position'),
convert(float, 'file_size_kb'),
update(event_product='cassandra', event_category='memtable', event_type='end_flush')),
rule(
capture(r"CFS\(Keyspace='(?P<keyspace>[^']*)', ColumnFamily='(?P<table>[^']*)'\) liveRatio is (?P<live_ratio>[0-9.]*) \(just-counted was (?P<just_counted>[0-9.]*)\). calculation took (?P<duration>[0-9]*)ms for (?P<cells>[0-9]*) (columns|cells)"),
convert(float, 'live_ratio', 'just_counted'),
convert(int, 'duration', 'cells'),
update(event_product='cassandra', event_category='memtable', event_type='live_ratio_estimate')),
rule(
capture('setting live ratio to maximum of (?P<max_sane_ratio>[0-9.]*) instead of (?P<live_ratio_estimate>[0-9.]*)'),
convert(float, 'max_sane_ratio', 'estimated_ratio'),
update(event_product='cassandra', event_category='memtable', event_type='live_ratio_max')),
case('SSTableDeletingTask'),
rule(
capture(r"Unable to delete (?P<sstable_file>[^ ]*) \(it will be removed on server restart; we'll also retry after GC\)"),
update(event_product='cassandra', event_category='compaction', event_type='sstable_deletion_failed')),
case('CompactionManager'),
rule(
capture(r"Will not compact (?P<sstable_name>[^:]*): it is not an active sstable"),
update(event_product='cassandra', event_category='compaction', event_type='inactive_sstable')),
rule(
capture(r"Compaction interrupted: (?P<compaction_type>[^@]*)@(?P<compaction_id>[^(]*)\((?P<table>[^,]*), (?P<keyspace>[^,]*), (?P<bytes_complete>[0-9]*)/(?P<bytes_total>[0-9]*)\)bytes"),
convert(int, 'bytes_complete', 'bytes_total'),
update(event_product='cassandra', event_category='compaction', event_type='compaction_interrupted')),
rule(
capture(r"No files to compact for user defined compaction"),
update(event_product='cassandra', event_category='compaction', event_type='no_files_to_compact')),
case('CompactionTask'),
rule(
capture(r'Compacting \[(?P<input_sstables>[^\]]*)\]'),
convert(sstables, 'input_sstables'),
update(event_product='cassandra', event_category='compaction', event_type='begin_compaction')),
rule(
capture(
r'Compacted (?P<sstable_count>[0-9]*) sstables to \[(?P<output_sstable>[^\]]*)\]. (?P<input_bytes>[0-9,]*) bytes to (?P<output_bytes>[0-9,]*) \(~(?P<percent_of_original>[0-9]*)% of original\) in (?P<duration>[0-9,]*)ms = (?P<rate>[0-9.]*)MB/s. (?P<total_partitions>[0-9,]*) total (partitions|rows), (?P<unique_partitions>[0-9,]*) unique. (Row|Partition) merge counts were \{(?P<partition_merge_counts>[^}]*)\}',
r'Compacted (?P<sstable_count>[0-9]*) sstables to \[(?P<output_sstable>[^\]]*)\]. (?P<input_bytes>[0-9,]*) bytes to (?P<output_bytes>[0-9,]*) \(~(?P<percent_of_original>[0-9]*)% of original\) in (?P<duration>[0-9,]*)ms = (?P<rate>[0-9.]*)MB/s. (?P<total_partitions>[0-9,]*) total (partitions|rows) merged to (?P<unique_partitions>[0-9,]*). (Row|Partition) merge counts were \{(?P<partition_merge_counts>[^}]*)\}'),
convert(int_with_commas, 'sstable_count', 'input_bytes', 'output_bytes', 'percent_of_original', 'duration', 'total_partitions', 'unique_partitions'),
convert(float, 'rate'),
convert(split(', '), 'partition_merge_counts'),
update(event_product='cassandra', event_category='compaction', event_type='end_compaction')),
case('CompactionController'),
rule(
capture(r'Compacting large (partition|row) (?P<keyspace>[^/]*)/(?P<table>[^:]*):(?P<partition_key>.*) \((?P<partition_size>[0-9]*) bytes\) incrementally'),
convert(int, 'partition_size'),
update(event_product='cassandra', event_category='compaction', event_type='incremental')),
case('SSTableWriter'),
rule(
capture(r'Compacting large partition (?P<keyspace>.+)/(?P<table>.+):(?P<partition_key>.+) \((?P<partition_size>\d+) bytes\)'),
convert(int, 'partition_size'),
update(event_product='cassandra', event_category='compaction', event_type='large_partition')),
case('Differencer', 'AntiEntropyService'),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] Endpoints (?P<node1>[^ ]*) and (?P<node2>[^ ]*) are consistent for (?P<table>.*)'),
update(event_product='cassandra', event_category='repair', event_type='endpoints_consistent')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] Endpoints (?P<node1>[^ ]*) and (?P<node2>[^ ]*) have (?P<ranges>[0-9]*) range\(s\) out of sync for (?P<table>.*)'),
convert(int, 'ranges'),
update(event_product='cassandra', event_category='repair', event_type='endpoints_inconsistent')),
case('RepairSession', 'AntiEntropyService'),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] Received merkle tree for (?P<table>[^ ]*) from (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='repair', event_type='merkle_received')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] (?P<table>[^ ]*) is fully synced'),
update(event_product='cassandra', event_category='repair', event_type='table_synced')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] session completed successfully'),
update(event_product='cassandra', event_category='repair', event_type='session_success')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] new session: will sync (?P<nodes>.*?) on range \((?P<range_begin>[^,]*),(?P<range_end>[^\]]*)\] for (?P<keyspace>[^.]*)\.\[(?P<tables>[^\]]*)\]'),
convert(split(', '), 'nodes', 'tables'),
update(event_product='cassandra', event_category='repair', event_type='new_session')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] Cannot proceed on repair because a neighbor \((?P<endpoint>[^)]*)\) is dead: session failed'),
update(event_product='cassandra', event_category='repair', event_type='session_cannot_proceed')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] session completed with the following error'),
update(event_product='cassandra', event_category='repair', event_type='session_error')),
case('RepairJob', 'AntiEntropyService'),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] requesting merkle trees for (?P<table>[^ ]*) \(to \[(?P<nodes>[^\]]*)\]\)'),
convert(split(', '), 'nodes'),
update(event_product='cassandra', event_category='repair', event_type='merkle_requested')),
rule(
capture(r'Error occurred during snapshot phase'),
update(event_product='cassandra', event_category='repair', event_type='error_during_snapshot')),
case('StreamInSession'),
rule(
capture(r'Finished streaming session (?P<session_id>[^ ]*) from (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='stream_in_end')),
case('StreamOut'),
rule(
capture(r'Stream context metadata \[(?P<metadata>[^\]]*)\], (?P<sstable_count>[0-9]*) sstables.'),
convert(split(', '), 'metadata'),
convert(int, 'sstable_count'),
update(event_product='cassandra', event_category='stream', event_type='context_metadata')),
rule(
capture(r'Beginning transfer to (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='transfer_begin')),
rule(
capture(r"Flushing memtables for \[CFS\(Keyspace='(?P<keyspace>[^']*)', ColumnFamily='(?P<table>[^']*)'\)\].*"),
update(event_product='cassandra', event_category='stream', event_type='flush_memtables')),
case('StreamOutSession'),
rule(
capture(r'Streaming to (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='stream_out_begin')),
case('FileStreamTask'),
rule(
capture(r'Finished streaming session to (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='stream_out_end')),
case('StreamResultFuture'),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Session with (?P<endpoint>[^ ]*) is complete'),
update(event_product='cassandra', event_category='stream', event_type='session_complete')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Prepare completed. Receiving (?P<receiving_files>[0-9]*) files\((?P<receiving_bytes>[0-9]*) bytes\), sending (?P<sending_files>[0-9]*) files\((?P<sending_bytes>[0-9]*) bytes\)'),
convert(int, 'receiving_files', 'receiving_bytes', 'sending_files', 'sending_bytes'),
update(event_product='cassandra', event_category='stream', event_type='prepare_complete')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Executing streaming plan for (?P<action>.*)'),
update(event_product='cassandra', event_category='stream', event_type='execute_plan')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] All sessions completed'),
update(event_product='cassandra', event_category='stream', event_type='all_sessions_complete')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Received streaming plan for (?P<action>.*)'),
update(event_product='cassandra', event_category='stream', event_type='plan_received')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Stream failed'),
update(event_product='cassandra', event_category='stream', event_type='failure')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Creating new streaming plan for Repair'),
update(event_product='cassandra', event_category='stream', event_type='create_plan')),
case('StreamCoordinator', 'StreamResultFuture'),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Beginning stream session with (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='begin_session')),
case('StreamingRepairTask'),
rule(
capture(r'\[streaming task #(?P<session_id>[^\]]*)\] Performing streaming repair of (?P<ranges>[0-9]*) ranges with (?P<endpoint>[^ ]*)'),
convert(int, 'ranges'),
update(event_product='cassandra', event_category='stream', event_type='begin_task')),
rule(
capture(r'\[repair #(?P<session_id>[^\]]*)\] streaming task succeed(ed)?, returning response to (?P<endpoint>[^ ]*)'),
update(event_product='cassandra', event_category='stream', event_type='task_succeeded')),
rule(
capture(r'\[(repair|streaming task) #(?P<session_id>[^\]]*)\] Forwarding streaming repair of (?P<ranges>[0-9]*) ranges to (?P<forwarded_endpoint>[^ ]*) \(to be streamed with (?P<target_endpoint>[^)]*)\)'),
convert(int, 'ranges'),
update(event_product='cassandra', event_category='stream', event_type='forwarding')),
rule(
capture(r'\[streaming task #(?P<session_id>[^\]]*)\] Received task from (?P<source_endpoint>[^ ]*) to stream (?P<ranges>[0-9]*) ranges to (?P<target_endpoint>.*)'),
convert(int, 'ranges'),
update(event_product='cassandra', event_category='stream', event_type='received_task')),
rule(
capture(r'\[streaming task #(?P<session_id>[^\]]*)\] task succeeded'),
update(event_product='cassandra', event_category='stream', event_type='task_succeded')),
rule(
capture(r'\[streaming task #(?P<session_id>[^\]]*)\] task succ?eed(ed)?, forwarding response to (?P<endpoint>[^ ]*)'),
update(event_product='cassandra', event_category='stream', event_type='forwarded_task_succeeded')),
case('StreamSession'),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Streaming error occurred'),
update(event_product='cassandra', event_category='stream', event_type='session_error')),
rule(
capture(r'\[Stream #(?P<session_id>[^\]]*)\] Starting streaming to (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='begin_stream')),
case('StreamReplyVerbHandler'),
rule(
capture(r'Successfully sent (?P<sstable_name>[^ ]*) to (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='stream', event_type='sstable_sent')),
case('IncomingTcpConnection'),
rule(
capture(r'UnknownColumnFamilyException reading from socket; closing'),
update(event_product='cassandra', event_category='messaging', event_type='unknown_table')),
case('OutboundTcpConnection'),
rule(
capture(r'Handshaking version with (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='gossip', event_type='handshake_version')),
rule(
capture(r'Cannot handshake version with (?P<endpoint>.*)'),
update(event_product='cassandra', event_category='gossip', event_type='handshake_failure')),
case('Gossiper'),
rule(
capture(r'InetAddress (?P<endpoint>[^ ]*) is now UP'),
update(event_product='cassandra', event_category='gossip', event_type='node_up')),
rule(
capture(r'InetAddress (?P<endpoint>[^ ]*) is now DOWN'),
update(event_product='cassandra', event_category='gossip', event_type='node_down')),
rule(
capture(r'Node (?P<endpoint>[^ ]*) has restarted, now UP'),
update(event_product='cassandra', event_category='gossip', event_type='node_restarted')),
rule(
capture(r'Node (?P<endpoint>[^ ]*) is now part of the cluster'),
update(event_product='cassandra', event_category='gossip', event_type='node_joined')),
rule(
capture(r'FatClient (?P<endpoint>[^ ]*) has been silent for 30000ms, removing from gossip'),
update(event_product='cassandra', event_category='gossip', event_type='remove_silent_client')),
rule(
capture(r'Sleeping for 30000ms to ensure (?P<endpoint>[^ ]*) does not change'),
update(event_product='cassandra', event_category='gossip', event_type='sleeping')),
rule(
capture(r'Removing host: (?P<host_id>.*)'),
update(event_product='cassandra', event_category='gossip', event_type='node_remove_host')),
rule(
capture(r'Completing removal of (?P<endpoint>[^ ]*)'),
update(event_product='cassandra', event_category='gossip', event_type='node_remove_complete')),
rule(
capture(r'Announcing shutdown'),
update(event_product='cassandra', event_category='gossip', event_type='announcing_shutdown')),
rule(
capture(r'Gossip stage has (?P<pending_tasks>[0-9]+) pending tasks; skipping status check \(no nodes will be marked down\)'),
convert(int, 'pending_tasks'),
update(event_product='cassandra', event_category='gossip', event_type='pending_tasks')),
case('SSTableReader'),
rule(
capture(r'Opening (?P<sstable_name>[^ ]*) \((?P<bytes>[0-9]*) bytes\)'),
convert(int, 'bytes'),
update(event_product='cassandra', event_category='startup', event_type='sstable_open')),
case('StatusLogger'),
rule(
capture(r'Pool Name +Active +Pending( +Completed)? +Blocked( +All Time Blocked)?'),
update(event_product='cassandra', event_category='status', event_type='threadpool_header')),
rule(
capture(r'(?P<pool_name>[A-Za-z_]+) +((?P<active>[0-9]+)|n/a) +(?P<pending>[0-9]+)(/(?P<pending_responses>[0-9]+))?( +(?P<completed>[0-9]+) +(?P<blocked>[0-9]+) +(?P<all_time_blocked>[0-9]+))?'),
convert(int, 'active', 'pending', 'pending_responses', 'completed', 'blocked', 'all_time_blocked'),
update(event_product='cassandra', event_category='status', event_type='threadpool_status')),
rule(
capture(r'Cache Type +Size +Capacity +KeysToSave(Provider)?'),
update(event_product='cassandra', event_category='status', event_type='cache_header')),
rule(
capture(r'(?P<cache_type>[A-Za-z]*Cache(?! Type)) *(?P<size>[0-9]*) *(?P<capacity>[0-9]*) *(?P<keys_to_save>[^ ]*) *(?P<provider>[A-Za-z_.$]*)'),
convert(int, 'size', 'capacity'),
update(event_product='cassandra', event_category='status', event_type='cache_status')),
rule(
capture(r'ColumnFamily +Memtable ops,data'),
update(event_product='cassandra', event_category='status', event_type='memtable_header')),
rule(
capture(r'(?P<keyspace>[^.]*)\.(?P<table>[^ ]*) +(?P<ops>[0-9]*),(?P<data>[0-9]*)'),
convert(int, 'ops', 'data'),
update(event_product='cassandra', event_category='status', event_type='memtable_status')),
case('CommitLogReplayer', 'CommitLog'),
rule(
capture(r'No commitlog files found; skipping replay'),
update(event_product='cassandra', event_category='startup', event_type='commit_log_replay_skipped')),
rule(
capture(r'Replaying (?P<commitlog_file>.*)'),
convert(split(', '), 'commitlog_file'),
update(event_product='cassandra', event_category='startup', event_type='begin_commitlog_replay')),
rule(
capture(r'Replaying (?P<commitlog_file>[^ ]*) \(CL version (?P<commitlog_version>[0-9]*), messaging version (?P<messaging_version>[0-9]*)\)'),
convert(int, 'commitlog_version', 'messaging_version'),
update(event_product='cassandra', event_category='startup', event_type='begin_commitlog_replay')),
rule(
capture(r'Finished reading (?P<commitlog_file>.*)'),
update(event_product='cassandra', event_category='startup', event_type='end_commitlog_replay')),
rule(
capture(r'Log replay complete, (?P<replayed_mutations>[0-9]*) replayed mutations'),
convert(int, 'replayed_mutations'),
update(event_product='cassandra', event_category='startup', event_type='end_commitlog_replay')),
case('SecondaryIndex', 'SecondaryIndexManager'),
rule(
capture(r'Creating new index : ColumnDefinition\{(?P<column_definition>[^}]*)\}'),
convert(split(', '), 'column_definition'),
update(event_product='cassandra', event_category='secondary_index', event_type='create')),
rule(
capture(r"Submitting index build of \[?(?P<keyspace>[^.]*)\.(?P<table>[^\] ]*)\]? for data in (?P<sstables>.*)"),
convert(sstables, 'sstables'),
update(event_product='cassandra', event_category='secondary_index', event_type='submit_build')),
rule(
capture(r'Index build of \[?(?P<keyspace>[^.]*)\.(?P<table>[^\] ]*)\]? complete'),
update(event_product='cassandra', event_category='secondary_index', event_type='build_complete')),
case('WorkPool'),
rule(
capture(r'Throttling at (?P<work_requests>[0-9]*) work requests per second with target total queue size at (?P<target_queue_size>[0-9]*)'),
convert(int, 'work_requests', 'target_queue_size'),
update(event_product='solr', event_category='backpressure', event_type='throttling')),
rule(
capture(r'Back pressure is active for (work pool )?(?P<work_pool>[^ ]*) (work pool )?with total work queue size (?P<queue_size>[0-9]*) and average processing time (?P<processing_time>[0-9]*)'),
convert(int, 'queue_size', 'processing_time'),
update(event_product='solr', event_category='backpressure', event_type='active')),
rule(
capture(r'Back pressure disabled for work pool Index'),
update(event_product='solr', event_category='backpressure', event_type='disabled')),
case('ShardRouter'),
rule(
capture(r'Updating shards state due to endpoint (?P<endpoint>[^ ]*) changing state (?P<state>.*)'),
update(event_product='solr', event_category='shard_routing', event_type='state_change')),
rule(
capture(r'Found routing endpoint: (?P<endpoint>[^ ]*)'),
update(event_product='solr', event_category='shard_routing', event_type='found_endpoint')),
rule(
capture(r'Added live routing endpoint (?P<endpoint>[^ ]*) for range \((?P<range_begin>[^,]*),(?P<range_end>[^\]]*)\]'),
update(event_product='solr', event_category='shard_routing', event_type='added_endpoint')),
case('QueryProcessor'),
rule(
capture(r'Column definitions for (?P<keyspace>[^.]*)\.(?P<table>[^ ]*) changed, invalidating related prepared statements'),
update(event_product='solr', event_category='schema', event_type='column_definition_changed')),
rule(
capture(r'Keyspace (?P<keyspace>[^ ]*) was dropped, invalidating related prepared statements'),
update(event_product='solr', event_category='schema', event_type='keyspace_dropped')),
rule(
capture(r'Table (?P<keyspace>[^.]*)\.(?P<table>[^ ]*) was dropped, invalidating related prepared statements'),
update(event_product='solr', event_category='schema', event_type='table_dropped')),
case('IndexSchema'),
rule(
capture(r'\[null\] Schema name=(?P<schema_name>.*)'),
update(event_product='solr', event_category='schema', event_type='schema_name')),
rule(
capture(r'Reading Solr Schema from (?P<schema_file>.*)'),
update(event_product='solr', event_category='schema', event_type='reading_schema_file')),
rule(
capture(r'unique key field: (?P<unique_key_field>.*)'),
update(event_product='solr', event_category='schema', event_type='unique_key_field')),
rule(
capture(r'default search field in schema is (?P<default_field>.*)'),
update(event_product='solr', event_category='schema', event_type='default_search_field')),
case('Cql3CassandraSolrSchemaUpdater'),
rule(
capture(r'No Cassandra column found for field: (?P<field_name>.*)'),
update(event_product='solr', event_category='schema', event_type='missing_cassandra_column')),
case('XMLLoader', 'XSLTResponseWriter'),
rule(
capture('xsltCacheLifetimeSeconds=(?P<lifetime_seconds>[0-9]*)'),
update(event_product='solr', event_category='xslt', event_type='xslt_cache_lifetime')),
case('SolrResourceLoader'),
rule(
capture(r'using system property solr.solr.home: (?P<solr_home>.*)'),
update(event_product='solr', event_category='resource', event_type='home_system_property')),
rule(
capture(r'No /solr/home in JNDI'),
update(event_product='solr', event_category='resource', event_type='home_jndi_missing')),
rule(
capture(r"new SolrResourceLoader for (?P<loader_type>[^:]*): '(?P<solr_home>[^']*)'"),
update(event_product='solr', event_category='resource', event_type='resource_loader')),
case('SolrCoreResourceManager'),
rule(
capture(r"Delete resources for core '(?P<keyspace>[^.]*)\.(?P<table>[^']*)' from 'solr_admin.solr_resources'"),
update(event_product='solr', event_category='resource', event_type='delete_resource')),
rule(
capture(r"Wrote resource '(?P<resource>[^']*)' for core '(?P<keyspace>[^.]*)\.(?P<table>[^']*)'"),
update(event_product='solr', event_category='resource', event_type='write_resource')),
rule(
capture(r'Trying to load resource (?P<resource>[^ ]*) for core (?P<keyspace>[^.]*).(?P<table>[^ ]*) by looking for legacy resources...'),
update(event_product='solr', event_category='resource', event_type='load_resource_legacy')),
rule(
capture(r'Trying to load resources? ((?P<resource>[^ ]*) )?for core (?P<keyspace>[^.]*).(?P<table>[^ ]*) by querying from local node with CL (?P<consistency_level>.*)'),
update(event_product='solr', event_category='resource', event_type='load_resource_query')),
rule(
capture(r'Successfully loaded (?P<count>[0-9]*)? ?resources?( (?P<resource>[^ ]*))? for core (?P<keyspace>[^.]*).(?P<table>[^ ]*)( by querying from local node with CL (?P<consistency_level>.*))?'),
update(event_product='solr', event_category='resource', event_type='load_resource_success')),
rule(
capture(r'No resource (?P<resource>[^ ]*) found for core (?P<keyspace>[^.]*).(?P<table>[^ ]*).*'),
update(event_product='solr', event_category='resource', event_type='load_resource_failure')),
rule(
capture(r"Unsupported schema version \((?P<schema_version>[^])*)\). Please use version '(?P<required_version>[^']*)' or greater."),
update(event_product='solr', event_category='resource', event_type='unsupported_schema_version')),
rule(
capture(r'Creating core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='resource', event_type='create_core')),
rule(
capture(r'Reloading core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='resource', event_type='reload_core')),
rule(
capture(r'Ignoring request trying to reload not existent core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='resource', event_type='ignore_reload_nonexistent_core')),
rule(
capture(r'Ignoring request trying to create already existent core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='resource', event_type='ignore_create_existing_core')),
rule(
capture(r'Composite keys are not supported on Thrift-compatible tables: (?P<composite_key>.*)'),
update(event_product='solr', event_category='resource', event_type='thrift_composite_key_error')),
#Plugin init failure for [schema.xml] fieldType "text_classes": Plugin init failure for [schema.xml] analyzer/tokenizer: Error instantiating class: 'org.apache.lucene.analysis.pattern.PatternTokenizerFactory'. Schema file is solr/conf/schema.xml
case('AbstractSolrSecondaryIndex'),
rule(
capture(r'Configuring index commit log for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='configure_index_commitlog')),
rule(
capture(r'Configuring index metrics for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='configure_index_metrics')),
rule(
capture(r'Ensuring existence of index directory (?P<index_directory>.*)'),
update(event_product='solr', event_category='index', event_type='ensure_index_directory')),
rule(
capture(r'Executing hard commit on index (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='execute_hard_commit')),
rule(
capture(r'Loading core on keyspace (?P<keyspace>[^ ]*) and column family (?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='load_core')),
rule(
capture(r'No commit log entries for core (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='no_commitlog_entries')),
rule(
capture(r'Start index TTL scheduler for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='start_index_ttl_scheduler')),
rule(
capture(r'Start index initializer for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='start_index_initializer')),
rule(
capture(r'Start index reloader for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='start_index_reloader')),
rule(
capture(r'Start indexing pool for (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='start_indexing_pool')),
rule(
capture(r'Waiting for DSE to startup \(if not already done\) and activate index on keyspace (?P<keyspace>[^ ]*) and column family (?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='startup_wait')),
rule(
capture(r'Reindexing on keyspace (?P<keyspace>[^ ]*) and column family (?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='reindexing')),
rule(
capture(r'Invalidating index (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='invalidating_index')),
rule(
capture(r'Deleting all documents from index (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='delete_all_documents')),
rule(
capture(r'Truncating index (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='truncate_index')),
rule(
capture(r'Flushing commit log for core (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='flushing_commit_log')),
rule(
capture(r'Enabling index updates for core (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='index', event_type='enable_index_updates')),
rule(
capture(r'Solr validation error for row\(\[(?P<row>[^\]]*)\]\), field\((?P<field>[^)]*)\), type\((?P<type>[^)]*)\), error: (?P<error>.*)'),
update(event_product='solr', event_category='index', event_type='validation_error')),
rule(
capture(r'Increasing soft commit max time to (?P<max_time>[0-9]+)'),
convert(int, 'max_time'),
update(event_product='solr', event_category='index', event_type='increasing_soft_commit')),
rule(
capture(r'Restoring soft commit max time back to (?P<max_time>[0-9]+)'),
convert(int, 'max_time'),
update(event_product='solr', event_category='index', event_type='restoring_soft_commit')),
case('DSESearchProperties'),
rule(
capture(r'Using default DSE search properties for Solr core (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='properties', event_type='default_search_properties')),
rule(
capture(r'Refreshed DSE search properties for: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='properties', event_type='refresh_search_properties')),
case('CassandraShowFileRequestHandler'),
rule(
capture(r"Couldn't find resource: (?P<resource>[^,]*), ignoring..."),
update(event_product='solr', event_category='resource', event_type='resource_not_found')),
case('CoreContainer'),
rule(
capture('Shutting down CoreContainer instance=(?P<instance>[0-9]*)'),
convert(int, 'instance'),
update(event_product='solr', event_category='core', event_type='corecontainer_shutdown')),
rule(
capture('New CoreContainer (?P<instance>[0-9]*)'),
convert(int, 'instance'),
update(event_product='solr', event_category='core', event_type='corecontainer_new')),
rule(
capture('registering core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='core', event_type='registering_core')),
rule(
capture('replacing core: (?P<keyspace>[^.]*).(?P<table>.*)'),
update(event_product='solr', event_category='core', event_type='replacing_core')),
case('CassandraCoreContainer'),
rule(
capture(r'WARNING: stored copy fields are deprecated, found stored copy field destination: (?P<field>[^{]*){type=(?P<type>[^,]*),properties=(?P<properties>[^}]*)}. All stored copy fields will be considered non-stored'),
update(event_product='solr', event_category='core', event_type='stored_copy_field_warning')),
case('SolrDispatchFilter'),
rule(
capture(r'SolrDispatchFilter.init\(\)'),
update(event_product='solr', event_category='dispatch', event_type='begin_init_dispatch_filter')),
rule(
capture(r'SolrDispatchFilter.init\(\) done'),
update(event_product='solr', event_category='dispatch', event_type='end_init_dispatch_filter')),
rule(
capture(r'Error request exception: (?P<error>.*)'),
update(event_product='solr', event_category='dispatch', event_type='request_exception')),
rule(
capture(r'Error request params: (?P<params>.*)'),
convert(split('&'), 'params'),
update(event_product='solr', event_category='dispatch', event_type='request_params_error')),
rule(
capture(r'\[admin\] webapp=(?P<webapp>[^ ]*) path=(?P<path>[^ ]*) params=\{(?P<params>[^}]*)\} status=(?P<status>[0-9]*) QTime=(?P<qtime>[0-9]*)'),
convert(split('&'), 'params'),
convert(int, 'status', 'qtime'),
update(event_product='solr', event_category='dispatch', event_type='admin_access')),
rule(
capture(r'user.dir=(?P<user_dir>.*)'),
update(event_product='solr', event_category='dispatch', event_type='user_dir')),
case('JmxMonitoredMap'),
rule(
capture(r'JMX monitoring is enabled. Adding Solr mbeans to JMX Server: (?P<mbean_class>[^@]*)@(?P<mbean_hash>.*)'),
update(event_product='solr', event_category='jmx', event_type='adding_mbeans')),
rule(
capture(r'Could not (?P<mbean_operation>[^ ]*) on info bean (?P<mbean_class>[^@]*)'),
update(event_product='solr', event_category='jmx', event_type='mbean_error')),
case('RequestHandlers'),
rule(
capture('Multiple requestHandler registered to the same name: (?P<path>[^ ]*) ignoring: (?P<ignored_class>.*)'),
update(event_product='solr', event_category='dispatch', event_type='ignore_multiple_request_handlers')),
case('SolrException'),
rule(
capture(r'.*'),
update(event_product='solr', event_category='error', event_type='exception')),
case('SolrConfig'),
rule(
capture(r'Using Lucene MatchVersion: (?P<matchversion>.*)'),
update(event_product='solr', event_category='config', event_type='lucene_matchversion')),
rule(
capture(r'Loaded SolrConfig: (?P<solrconfig>.*)'),
update(event_product='solr', event_category='config', event_type='load_solrconfig')),
case('CachingDirectoryFactory'),
rule(
capture(r'return new directory for (?P<directory>.*)'),
update(event_product='solr', event_category='directory_factory', event_type='return_new_directory')),
rule(
capture(r'Closing directory: (?P<directory>.*)'),
update(event_product='solr', event_category='directory_factory', event_type='closing_directory')),
rule(
capture(r'Timeout waiting for all directory ref counts to be released - gave up waiting on CachedDir<<refCount=(?P<ref_count>[0-9]*);path=(?P<path>[^;]*);done=(?P<done>[^>]*)>>'),
convert(int, 'ref_count'),
update(event_product='solr', event_category='directory_factory', event_type='close_directory_pending')),
rule(
capture(r'looking to close (?P<directory>[^ ]*) \[CachedDir<<refCount=(?P<ref_count>[0-9]*);path=(?P<path>[^;]*);done=(?P<done>[^>]*)>>\]'),
convert(int, 'ref_count'),
update(event_product='solr', event_category='directory_factory', event_type='close_directory_pending')),
rule(
capture(r'Closing (?P<directory_factory>[^ ]*) - (?P<directory_count>[0-9]*) directories currently being tracked'),
convert(int, 'ref_count'),
update(event_product='solr', event_category='directory_factory', event_type='close_directory_factory')),
case('YamlConfigurationLoader', 'DseConfigYamlLoader', 'DatabaseDescriptor'),
rule(
capture(r'Loading settings from file:(?P<yaml_file>.*)'),
update(event_product='cassandra', event_category='startup', event_type='config_file')),
rule(
capture(r'Node configuration:\[(?P<settings>.*)\]'),
convert(lambda x: dict([y.split('=', 1) for y in x.split('; ')]), 'settings'),
update(event_product='cassandra', event_category='startup', event_type='yaml_settings')),
case('DatabaseDescriptor'),
rule(
capture(r'commit_failure_policy is (?P<policy>.*)'),
update(event_product='cassandra', event_category='startup', event_type='commit_failure_policy')),
rule(
capture(r'disk_failure_policy is (?P<policy>.*)'),
update(event_product='cassandra', event_category='startup', event_type='disk_failure_policy')),
rule(
capture(r'Data files directories: \[(?P<data_file_directories>[^\]]*)\]'),
convert(split(', '), 'data_file_directories'),
update(event_product='cassandra', event_category='startup', event_type='data_file_directories')),
rule(
capture(r'Commit log directory: (?P<commit_log_directory>.*)'),
update(event_product='cassandra', event_category='startup', event_type='commit_log_directory')),
rule(
capture(r"DiskAccessMode 'auto' determined to be (?P<disk_access_mode>[^,]*), indexAccessMode is (?P<index_access_mode>.*)"),
update(event_product='cassandra', event_category='startup', event_type='disk_access_mode', auto_determined=True)),
rule(
capture(r"DiskAccessMode is (?P<disk_access_mode>[^,]*), indexAccessMode is (?P<index_access_mode>.*)"),
update(event_product='cassandra', event_category='startup', event_type='disk_access_mode', auto_determined=False)),
rule(
capture(r'Not using multi-threaded compaction'),
update(event_product='cassandra', event_category='startup', event_type='multi_threaded_compaction', enabled=False)),
rule(
capture(r'using multi-threaded compaction'),
update(event_product='cassandra', event_category='startup', event_type='multi_threaded_compaction', enabled=True)),
rule(
capture(r'Global memtable (?P<memtable_location>off-heap|on-heap) ?threshold is enabled at (?P<memtable_threshold>[0-9]*)MB'),
update(event_product='cassandra', event_category='startup', event_type='global_memtable_threshold')),
case('Worker', 'IndexWorker'),
rule(
capture(r'Shutting down work pool worker!'),
update(event_product='solr', event_category='shutdown', event_type='work_pool_shutdown')),
case('LeaderManagerWatcher'),
rule(
capture(
r'OH GOD',
r"Couldn't run initialization block"),
update(event_product='dse', event_category='jobtracker', event_type='leader_manager_exception')),
rule(
capture(r'(?P<leader_manager>[^:]*): Leader (?P<dc_army>[^ ]*) changed from (?P<old_leader>[^ ]*) to (?P<new_leader>[^ ]*) \[(?P<reason>[^\]]*)\] \[notified (?P<listeners_notified>[0-9]*) listeners\]'),
convert(int, 'listeners_notified'),
update(event_product='dse', event_category='jobtracker', event_type='leader_changed')),
rule(
capture(r'(?P<leader_manager>[^:]*): new listener for (?P<dc_army>[^ ]*) initialized to (?P<listener>.*)'),
update(event_product='dse', event_category='jobtracker', event_type='new_listener')),
rule(
capture(r'Local query timed out.+'),
update(event_product='dse', event_category='jobtracker', event_type='timeout')),
case('ExternalLogger', 'ExternalLogger SparkWorker-0'),
rule(
capture(r'.*'),
update(event_product='spark', event_category='misc', event_type='external_logger')),