-
Notifications
You must be signed in to change notification settings - Fork 11
/
faq.html
3252 lines (3154 loc) · 124 KB
/
faq.html
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
---
title: FAQ
---
<!DOCTYPE html>
<html lang="en" style="height:100%;">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-137788272-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag () { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-137788272-1');
</script>
<title>Moloch FAQ</title>
<!-- Required meta tags always come first -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="description" content="Frequently asked Moloch questions" />
<!-- facebook open graph tags -->
<meta property="og:url" content="http://molo.ch/faq" />
<meta property="og:description" content="Frequently asked Moloch questions" />
<meta property="og:image" content="http://molo.ch/moloch_2x2.png" />
<!-- twitter card tags additive with the og: tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:domain" value="molo.ch" />
<meta name="twitter:description" value="Frequently asked Moloch questions" />
<meta name="twitter:image" content="http://molo.ch/moloch_2x2.png" />
<meta name="twitter:url" value="http://molo.ch/faq" />
<!-- fontawesome http://fontawesome.io/ -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Bootstrap CSS https://getbootstrap.com/ -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<!-- custom index page styles -->
<link rel="stylesheet" type="text/css" href="index.css">
<!-- page functions -->
<script src="index.js"></script>
</head>
<body id="viewport"
class="full-height-body">
<!-- navbar -->
{%- include navbar.html -%}
<!-- toc nav -->
<div class="left-nav d-none d-sm-block">
<div class="nav nav-pills nav-pills-nested pb-3">
<a href="#general"
class="nav-link"
title="General">
General
</a>
<a class="nav-link nested"
href="#why-should-i-use-moloch"
title="Why should I use Moloch?">
Why should I use Moloch?
</a>
<a class="nav-link nested"
href="#upgrading-moloch"
title="Upgrading Moloch">
Upgrading Moloch
</a>
<a class="nav-link nested"
href="#what-oses-are-supported"
title="What OSes are supported?">
What OSes are supported?
</a>
<a class="nav-link nested"
href="#moloch-is-not-working"
title="Moloch is not working">
Moloch is not working
</a>
<a class="nav-link nested"
href="#how-do-i-reset-moloch"
title="How do I reset Moloch?">
How do I reset Moloch?
</a>
<a class="nav-link nested"
href="#self-signed-ssl-tls-certificates"
title="Self-Signed SSL/TLS Certificates">
Self-Signed SSL/TLS Certificates
</a>
<a class="nav-link nested"
href="#how_do_i_upgrade_to_moloch_1"
title="How do I upgrade to Moloch 1.0">
How do I upgrade to Moloch 1.0
</a>
<a class="nav-link nested"
href="#how_do_i_upgrade_to_moloch_2"
title="How do I upgrade to Moloch 2.0">
How do I upgrade to Moloch 2.0
</a>
<a href="#elasticsearch"
class="nav-link"
title="Elasticsearch">
Elasticsearch
</a>
<a class="nav-link nested"
href="#how-many-elasticsearch-nodes-or-machines-do-i-need"
title="How many Elasticsearch nodes or machines do I need?">
How many Elasticsearch nodes or machines do I need?
</a>
<a class="nav-link nested"
href="#data-never-gets-deleted"
title="Data never gets deleted">
Data never gets deleted
</a>
<a class="nav-link nested"
href="#error-dropping-request-_bulk"
title="ERROR - Dropping request /_bulk">
ERROR - Dropping request /_bulk
</a>
<a class="nav-link nested"
href="#when-do-i-add-additional-nodes-why-are-queries-slow"
title="When do I add additional nodes? Why are queries slow?">
When do I add additional nodes? Why are queries slow?
</a>
<a class="nav-link nested"
href="#removing-nodes"
title="Removing nodes">
Removing nodes
</a>
<a class="nav-link nested"
href="#how-do-i-enable-elasticsearch-replication"
title="How do I enable Elasticsearch replication?">
How do I enable Elasticsearch replication?
</a>
<a class="nav-link nested"
href="#how-do-i-upgrade-elasticsearch"
title="How do I upgrade Elasticsearch?">
How do I upgrade Elasticsearch?
</a>
<a class="nav-link nested"
href="#how-do-i-upgrade-to-es-7-x"
title="How do I upgrade to ES 7.x?">
How do I upgrade to ES 7.x?
</a>
<a class="nav-link nested"
href="#how-do-i-upgrade-to-es-6-x"
title="How do I upgrade to ES 6.x?">
How do I upgrade to ES 6.x?
</a>
<a class="nav-link nested"
href="#how_do_i_upgrade_to_es_5x"
title="How do I upgrade to ES 5.x?">
How do I upgrade to ES 5.x?
</a>
<a class="nav-link nested"
href="#version-conflict"
title="version conflict, current version [N] is higher or equal to the one provided [M]">
version conflict, current version [N] is higher or equal to the one provided [M]
</a>
<a class="nav-link nested"
href="#recommended-elasticsearch-settings"
title="Recommended Elasticsearch Settings">
Recommended Elasticsearch Settings
</a>
<a class="nav-link nested"
href="#ilm"
title="Using ILM with Molcoh">
Using ILM with Moloch
</a>
<a href="#capture"
class="nav-link"
title="Capture">
Capture
</a>
<a class="nav-link nested"
href="#what-kind-of-capture-machines-should-we-buy"
title="What kind of capture machines should we buy?">
What kind of capture machines should we buy?
</a>
<a class="nav-link nested"
href="#what-kind-of-network-packet-broker-should-we-buy"
title="What kind of Network Packet Broker should we buy?">
What kind of Network Packet Broker should we buy?
</a>
<a class="nav-link nested"
href="#what-kind-of-packet-capture-speeds-can-moloch-capture-handle"
title="What kind of packet capture speeds can moloch-capture handle?">
What kind of packet capture speeds can moloch-capture handle?
</a>
<a class="nav-link nested"
href="#moloch_requires_full_packet_captures_error"
title="Moloch requires full packet captures error">
Moloch requires full packet captures error
</a>
<a class="nav-link nested"
href="#why-am-i-dropping-packets"
title="Why am I dropping packets?">
Why am I dropping packets?
</a>
<a class="nav-link nested"
href="#how-do-i-import-existing-pcaps"
title="How do I import existing PCAPs?">
How do I import existing PCAPs?
</a>
<a class="nav-link nested"
href="#how-do-i-monitor-multiple-interfaces"
title="How do I monitor multiple interfaces?">
How do I monitor multiple interfaces?
</a>
<a class="nav-link nested"
href="#moloch-capture-crashes"
title="Moloch capture crashes">
Moloch capture crashes
</a>
<a class="nav-link nested"
href="#error-pcap-open-failed"
title="ERROR - pcap open failed">
ERROR - pcap open failed
</a>
<a class="nav-link nested"
href="#how-to-reduce-amount-of-traffic-pcap"
title="How to reduce amount of traffic/PCAP?">
How to reduce amount of traffic/PCAP?
</a>
<a class="nav-link nested"
href="#life-of-a-packet"
title="Life of a packet">
Life of a packet
</a>
<a class="nav-link nested"
href="#pcap-deletion"
title="PCAP Deletion">
PCAP Deletion
</a>
<a class="nav-link nested"
href="#dontsavebpfs-doesn-t-work"
title="dontSaveBPFs doesn’t work">
dontSaveBPFs doesn’t work
</a>
<a class="nav-link nested"
href="#zero-byte-pcap-files"
title="Zero or missing bytes PCAP files">
Zero or missing bytes PCAP files
</a>
<a class="nav-link nested"
href="#can-i-virtualize-moloch-with-kvm-using-openvswitch"
title="Can I virtualize Moloch with KVM using OpenVswitch?">
Can I virtualize Moloch with KVM using OpenVswitch?
</a>
<a class="nav-link nested"
href="#maxmind"
title="Installing MaxMind Geo free database files">
Installing MaxMind Geo free database files
</a>
<a class="nav-link nested"
href="#loglines"
title="What do these log lines mean">
What do these log lines mean?
</a>
<a href="#viewer"
class="nav-link"
title="Viewer">
Viewer
</a>
<a class="nav-link nested"
href="#where-do-i-learn-more-about-the-expressions-available"
title="Where do I learn more about the expressions available?">
Where do I learn more about the expressions available?
</a>
<a class="nav-link nested"
href="#exported-pcap-files-are-corrupt-sometimes-session-detail-fails"
title="Exported PCAP files are corrupt, sometimes session detail fails">
Exported PCAP files are corrupt, sometimes session detail fails
</a>
<a class="nav-link nested"
href="#map-counts-are-wrong"
title="Map counts are wrong">
Map counts are wrong
</a>
<a class="nav-link nested"
href="#what-browsers-are-supported"
title="What browsers are supported?">
What browsers are supported?
</a>
<a class="nav-link nested"
href="#error-getaddrinfo-eaddrinfo"
title="Error: getaddrinfo EADDRINFO">
Error: getaddrinfo EADDRINFO
</a>
<a class="nav-link nested"
href="#how-do-i-proxy-moloch-using-apache"
title="How do I proxy Moloch using Apache">
How do I proxy Moloch using Apache
</a>
<a class="nav-link nested"
href="#i-still-get-prompted-for-password-after-setting-up-apache-auth"
title="I still get prompted for password after setting up Apache auth">
I still get prompted for password after setting up Apache auth
</a>
<a class="nav-link nested"
href="#how-do-i-search-multiple-moloch-clusters"
title="How do I search multiple Moloch clusters">
How do I search multiple Moloch clusters?
</a>
<a class="nav-link nested"
href="#how-do-i-use-self-signed-ssl-tls-certificates-with-multies"
title="How do I use self-signed SSL/TLS Certificates with MultiES?">
How do I use self-signed SSL/TLS Certificates with MultiES?
</a>
<a class="nav-link nested"
href="#how-do-i-reset-my-password"
title="How do I reset my password?">
How do I reset my password?
</a>
<a class="nav-link nested"
href="#error-couldn-t-connect-to-remote-viewer-only-displaying-spi-data"
title="Error: Couldn’t connect to remote viewer, only displaying SPI data">
Error: Couldn’t connect to remote viewer, only displaying SPI data
</a>
<a class="nav-link nested"
href="#compiled-against-a-different-node-js-version-error"
title="Compiled against a different Node.js version error">
Compiled against a different Node.js version error
</a>
<a href="#parliament"
class="nav-link"
title="Parliament">
Parliament
</a>
<a class="nav-link nested"
href="#sample-apache-config"
title="Sample Apache Config">
Sample Apache Config
</a>
<a href="#wise"
class="nav-link"
title="WISE">
WISE
</a>
<a class="nav-link nested"
href="#wise-is-not-working"
title="WISE is not working">
WISE is not working
</a>
<a href="#molochweb"
class="nav-link"
title="Molo.ch">
Molo.ch
</a>
<a class="nav-link nested"
href="#how-can-i-contribute"
title="How can I contribute">
How can I contribute
</a>
</div>
</div> <!-- /toc nav -->
<!-- toc expand/collapse -->
<div class="collapse-btn d-none d-sm-block"
onclick="toggleToc()">
<span class="fa fa-angle-double-left">
</span>
</div> <!-- /toc expand/collapse -->
<!-- faq container -->
<div class="full-height-container">
<!-- faq content -->
<div class="pl-3 pr-3">
<!-- general -->
<h1 id="general"
class="border-bottom">
General
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h1>
<h3 id="why-should-i-use-moloch">
Why should I use Moloch?
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
If you want a standalone open source full packet capture (FPC)
system with meta data parsing and searching, then Moloch may be
your answer! Moloch allows you complete control of deployment
and architecture. There are
<a href="otherfpc">
other FPC systems
</a>
available.
</p>
<h3 id="upgrading-moloch">
Upgrading Moloch
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
Upgrading Moloch requires you install versions in order, as
described in the chart below. If the version you are currently
on isn’t listed please upgrade to the next higher version in the
chart, you can then install the major releases in order to catch up.
New installs can start from the latest version.
</p>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>
Moloch Version
</th>
<th>
Min upgrade from
</th>
<th>
ES Versions
</th>
<th>
Special Instructions
</th>
<th>
Notes
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
2.2+
</td>
<td>
1.7.0 (1.8.0 recomended)
</td>
<td>
6.8.2+ (6.8.6+ recommended), 7.1+ (7.8.0+ recommended, 7.7.0 broken)
</td>
<td>
<a href="#how_do_i_upgrade_to_moloch_2"> Moloch 2.0 instructions </a>
</td>
<td>
Must already be on 6.8.x or 7.1+ before upgrading to 2.2
</td>
</tr>
<tr>
<td>
2.0, 2.1
</td>
<td>
1.7.0 (1.8.0 recomended)
</td>
<td>
6.7, 6.8, 7.1+
</td>
<td>
<a href="#how_do_i_upgrade_to_moloch_2"> Moloch 2.0 instructions </a>
</td>
<td>
Must already be on ES 6.7 or 6.8 (ES <a href="https://www.elastic.co/downloads/past-releases/elasticsearch-oss-6-8-6">6.8.6</a> recommended) before upgrading to 2.0
</td>
</tr>
<tr>
<td>
1.8
</td>
<td>
1.0.0 (1.1.x recommended)
</td>
<td>
5.x or 6.x
</td>
<td>
<a href="#how-do-i-upgrade-to-es-6-x">
ES 6 instructions
</a>
</td>
<td>
Must have finished the 1.x reindexing, stop captures for best results
</td>
</tr>
<tr>
<td>
1.1.1
</td>
<td>
0.20.2 (0.50.1 recommended)
</td>
<td>
5.x or 6.x (new only)
</td>
<td>
<a href="how_do_i_upgrade_to_moloch_1">
Instructions
</a>
</td>
<td>
Must be on ES 5 already
</td>
</tr>
<tr>
<td>
0.20.2
</td>
<td>
0.18.1 (0.20.2 recomended)
</td>
<td>
2.4, 5.x
</td>
<td>
<a href="#how_do_i_upgrade_to_es_5x">
ES 5 instructions
</a>
</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="what-oses-are-supported">
What OSes are supported?
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
We have RPMs/DEBs available on the
<a href="downloads">
downloads page
</a>
Our deployment is on Centos 7 with the elrepo 4.x kernel installed for packet performance increases and better afpacket support.
A large amount of development is done on Mac OS X 10.15 using MacPorts or Homebrew, however, it has never been tested in a production setting. :)
Moloch is NOT supported on 32 bit machines.
</p>
<p>
The following OSes should work out of the box for compiling yourself:
</p>
<ul>
<li>
CentOS/RHEL 7
</li>
<li>
Amazon Linux 2
</li>
<li>
Ubuntu 16.04, 18.04
</li>
<li>
FreeBSD 9
</li>
<li>
FreeBSD 10.0 (wiseService doesn’t work, but the wise plugin
does), 10.3 is known NOT to compile currently.
</li>
</ul>
<h3 id="moloch-is-not-working">
Moloch is not working
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
Here is the common check list:
</p>
<ol>
<li>
Check that Elasticsearch is running and green using
<pre><code>curl http://localhost:9200/_cat/health</code></pre>
on the machine running Elasticsearch.
</li>
<li>
Check that the db has been initialized with
<code>/data/moloch/db/db.pl http://ESHOST:9200 info</code>
</li>
<li>
Check that viewer is reachable by visiting
<code>http://moloch-viewer.hostname:8005</code>
from your browser
<ol type="a">
<li>
If it doesn’t render, looks strange or warns of an old browser, use a newer
<a href="#what-browsers-are-supported">
supported browser
</a>
</li>
</ol>
</li>
<li>
Check for errors in <code>/data/moloch/logs/viewer.log</code> and that viewer is running with <code>pgrep -lf viewer</code>
</li>
<li>
Check for errors in <code>/data/moloch/logs/capture.log</code> and that capture is running with <code>pgrep -lf capture</code>
</li>
<li>
Check that the stats page shows the capture nodes you are expecting, visit
<code>http://moloch-viewer.hostname:8005/stats?statsTab=1</code> in your browser.
<ol type="a">
<li>
Make sure the nodes are showing packets being received
</li>
<li>
Make sure the timestamp for nodes is recent (within 5 seconds)
</li>
</ol>
</li>
<li>
Disable any <code>bpf=</code> in <code>/data/moloch/etc/config.ini</code>, if that fixes the issue read
<a href="#dontsavebpfs-doesn-t-work">BPF FAQ answer</a>
</li>
<li>
If the browser has "Oh no, Moloch is empty! There is no
data to search." but the stats tab shows packets are being captured:
<ol type="a">
<li>
Live capture Moloch only writes records when a session has ended, it will take
several minutes for session to show up after a fresh start, see
<code>/data/moloch/etc/config.ini</code> to shorten the timeouts
</li>
<li>
Elasticsearch will only refresh the indices once a minute with the default Moloch config,
force a refresh with <code>curl http://ESHOST:9200/_refresh</code>
</li>
<li>
Verify your time frame for search covers the data (try switching to ALL)
</li>
<li>
Check that you don’t have a view set
</li>
<li>
Check that your user doesn’t have a forced expression set, might need to ask your Moloch admin
</li>
</ol>
</li>
<li>
Restart <code>moloch-capture</code> after adding a
<code>--debug</code> option may print out useful information what is
wrong if you are having packet capture issues. You can add multiple
<code>--debug</code> options to get even more information.
Capture will print out the config settings it is using, verify they
are what you expect.
</li>
<li>
Restart viewer after adding a
<code>--debug</code> option may print out useful information what is
wrong if you are having issues viewing packets that were captured
<ol type="a">
<li>
Make sure the plugins and parsers directories are correctly set
in <code>/data/moloch/etc/config.ini</code> and readable by the
viewer process
</li>
</ol>
</li>
</ol>
<h3 id="how-do-i-reset-moloch">
How do I reset Moloch?
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<ol>
<li>
Leave Elasticsearch running
</li>
<li>
Shutdown all running viewer or capture processes so no new data is
recorded.
</li>
<li>
To delete all the SPI data stored in Elasticsearch, use the
<code>db.pl</code> script with either the <code>init</code> or
<code>wipe</code> commands. The only difference between the two
commands is that <code>wipe</code> leaves the
added users so they don’t need to be re-added.
<pre><code>/data/moloch/db/db.pl ESHOST:ESPORT wipe</code></pre>
</li>
<li>
Delete the PCAP files. The PCAP files are stored on the file system in
raw format. You need to do this on <strong>all</strong> of the capture
machines.
<pre><code>/bin/rm -f /data/moloch/raw/*</code></pre>
</li>
</ol>
<h3 id="self-signed-ssl-tls-certificates">
Self-Signed SSL/TLS Certificates
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
It is possible to get self signed certificates to work in the following
scenarios:
</p>
<ul>
<li>
User to Moloch Viewer
</li>
<li>
Viewer to Elasticsearch
</li>
<li>
Capture to Elasticsearch
</li>
<li>
MultiES to Elasticsearch
</li>
<li>
Viewer to MultiES
</li>
</ul>
<p>
Usually the easiest way is to add the self signed cert to the OS's list
of valid certificates or chains. Googling is the best way to figure out
how to do this. Viewer also supports a <code>caTrustFile</code> option.
</p>
<p>
The core Moloch team does not support or recommend self signed certs.
Use the money you are saving on a commercial product and go buy real
certs. Wildcard certs are now cheap and you can even go with free
Lets Encrypt certs. There may be folks on the Moloch slack workspace
willing to help out.
</p>
<p>
Both capture and viewer can run with <code>--insecure</code> to turn off
cert checking. You will need to add this option to the startup command for
both capture, viewer. For example <code>/etc/systemd/system/molochcapture.conf</code>.
</p>
<h3 id="how_do_i_upgrade_to_moloch_1">
How do I upgrade to Moloch 1.0
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
Moloch 1.0 has some large changes and updates that will require all
session data to be reindexed. The reindexing is done in the background
AFTER upgrading so there is little downtime. Large changes in 1.0 include:
</p>
<ul>
<li>
All the field names have been renamed, and analyzed fields have been
removed
</li>
<li>
Country codes are being changed from 3 character to 2 character
</li>
<li>
Tags will NOT be migrated if added before 0.14.1
</li>
<li>
The data for http.hasheader and email.hasheader will NOT migrate
</li>
<li>
IPv6 is fully supported and uses the Elasticsearch <code>ip</code> type
</li>
</ul>
<p>
If you have any special parsers, tagger, plugins or wise source you may
have to change configurations.
</p>
<ul>
<li>
All db fields will need -term removed, capture won’t start and will
warn you
</li>
</ul>
<p>To upgrade:</p>
<ul>
<li>
First make sure you are using ES 5.5.x (5.6 recommended) and Moloch
0.20.2 or 0.50.x before continuing. Upgrade to those version first!
</li>
<li>
Download 1.1.1 from the
<a href="downloads">
downloads page
</a>
</li>
<li>
Shutdown all capture, viewer and wise processes
</li>
<li>
Install Moloch 1.1.1
</li>
<li>
Run <code>/data/moloch/bin/moloch_update_geo.sh</code> on all capture
nodes which will download the new mmdb style maxmind files
</li>
<li>
Run <code>db.pl http://ESHOST:9200 upgrade</code> once
</li>
<li>
Start wise, then capture, then viewers.
Especially watch the capture.log file for any warnings/errors.
</li>
<li>
Verify that NEW data is being collected and showing up in viewer,
all old data will NOT show up yet.
</li>
</ul>
<p>
Once 1.1.1 is working, its time to reindex the old session data:
</p>
<ul>
<li>
Disable any db.pl expire or optimize jobs, or curator
</li>
<li>
Start screen or tmux since this will take several days
</li>
<li>
In the <code>/data/moloch/viewer</code> directory, run
<code>/data/moloch/viewer/reindex2.js --slices X</code>
<ul>
<li>
The number of slices should be between 2 and the number of shards
each index has, the higher the faster but more Elasticsearch CPU
that will be used. We recommend 1/2 the number of shards.
</li>
<li>
You can optionally add a --index option if there are indices you
need to reindex first, otherwise it will work from newest to oldest
</li>
<li>
You can optionally add a --deleteOnDone, which will delete indices
as they are converted, but you may want to try a reindex first on 1
index to make sure it is working.
</li>
</ul>
</li>
<li>
As reindex runs old data will show up in viewer
</li>
<li>
Delete ALL old indices with
<pre><code>curl -XDELETE 'http://localhost:9200/sessions-*'</code></pre>
</li>
<li>
Once the reindex finishes run the db.pl expire/optimize or curator job
manually, this will take a while
</li>
<li>
Now can reenable any db.pl expire or optimize jobs, or curator.
<strong>
Do NOT reenable crons until you let them run and finish manually.
</strong>
</li>
</ul>
<h3 id="how_do_i_upgrade_to_moloch_2">
How do I upgrade to Moloch 2.0
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
Upgrading to Moloch 2.0 is a multistep process that requires an outage.
An outage is required because all the captures must be stopped before upgrading the database so there are no schema issues or corruption.
Most of the administrative indices will have new version numbers after this upgrade, so that elasticsearch knows they were created with 6.7 or 6.8.
This is very important when upgrading to ES 7.x later.
</p>
<ul>
<li>You must be using Moloch 1.7 or 1.8 (Moloch 1.8.0 recommended) BEFORE trying to upgrade to Moloch 2.0</li>
<li>You must be using Elasticsearch 6.7 or 6.8 (Elasticsearch <a href="https://www.elastic.co/downloads/past-releases/elasticsearch-oss-6-8-6">6.8.6</a> or later recommended) BEFORE trying to upgrade to Moloch 2.0</li>
<li>Install Moloch >= 2.0 without restarting captures/viewers</li>
<li>Optional: run <code> ./db.pl http://ESHOST:9200 backup pre20 </code> to backup all administrative indices.
<li>Shutdown captures</li>
<li> run <code> ./db.pl http://ESHOST:9200 upgrade</code></li>
<li>Restart captures</li>
<li>Verify everything is working</li>
</ul>
<p>
After verifying 2.0 is working fine while still using Elasticsearch 6, you can upgrade to Elasticsearch 7 using these <a href="#how-do-i-upgrade-to-es-7-x">instructions</a>.
</p>
<!-- /general -->
<!-- elasticsearch -->
<br>
<h1 id="elasticsearch"
class="border-bottom">
Elasticsearch
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h1>
<h3 id="how-many-elasticsearch-nodes-or-machines-do-i-need">
How many Elasticsearch nodes or machines do I need?
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>The answer, of course, is "it depends". Factors include:</p>
<ul>
<li>
How much memory each box has
</li>
<li>
How many days you want to store meta data (SPI data) for
</li>
<li>
How fast the disks are
</li>
<li>
What percentage of the traffic is HTTP/DNS
</li>
<li>
The average transfer rate of all the interfaces
</li>
<li>
If the sessions are long lived or short lived
</li>
<li>
How fast response times should be for operators
</li>
<li>
How many operators are querying at the same time
</li>
</ul>
<p>
Some important things to remember when designing your cluster:
</p>
<ul>
<li>
SPI data is usually kept longer then PCAP data. For example, you may
store PCAP for a week but SPI data for a month.
</li>
<li>
Have at least 3% of disk space available in memory. For example, if the
cluster has 7TB of data then 7*0.03 or 210GB of memory is the minimum
recommended. Note: the more days store the memory ratio can actually
decrease, to 2% or 1%.
</li>
<li>
Assign half the memory to Elasticsearch (but no more then 31G per node,
read
<a href="https://www.elastic.co/blog/a-heap-of-trouble"
rel="nofollow">
https://www.elastic.co/blog/a-heap-of-trouble</a>)
and half the memory to disk cache.
</li>
<li>
Use version 6 of Elasticsearch or later.
</li>
<li>
A quick disk requirement estimate is 5% of the PCAP storage, if storing for the same amount of time.
</li>
<li>
If you have large machines, they you can run multiple nodes per MACHINE.
</li>
</ul>
<p>
We have some <a href="estimators"> estimators </a> that may help.
</p>
<p>
The good news is that it is easy to add new nodes in the future, so feel free to start with less nodes.
As a temporary fix to capacity problems, you can reduce the number of days of meta data that are stored.
You can use the Moloch ES Indices tab to delete the oldest <code>sessions2</code> index.
</p>
<h3 id="data-never-gets-deleted">
Data never gets deleted
<span class="fa fa-link small copy-link cursor-copy"
onclick="copyLink(this, 'faq')">
</span>
</h3>
<p>
The SPI data in Elasticsearch and the PCAP data are not deleted at the same time.
The PCAP data is deleted as the disk fills up on the capture machines,
<a href="#pcap-deletion">more info</a>. PCAP deletion happens automatically
and nothing needs to be done.
The SPI data is deleted when the <code>./db.pl expire</code>
command is run, usually from cron during off peak. There is a sample in
the daily.sh script. The SPI data deletion does NOT happen automatically
and a cron job MUST be set up.
</p>
<p>
So deleting a PCAP file will NOT delete the SPI data, and deleting the
SPI data will not delete the PCAP data from disk.
</p>
<p>
The UI does have commands to delete and scrub individual sessions, but
the user must have the <code>Remove Data</code>
ability on the users tab. Usually this feature is used for things you don’t want
operators to see, such as bad images.
</p>
<h3 id="error-dropping-request-_bulk">
ERROR - Dropping request /_bulk