Repository navigation
Make sure you set up the db/daily.sh script to run once a day, during off peak. This script optimizes the previous days data and deletes the oldest data.
If queries are too slow then the easiest fix is to add additional elasticsearch nodes. You should also use the bigdesk http://moloches-machine:9200/_plugin/bigdesk/ and watch the heap memory graph, if it is approaching the max it is time to add more nodes or reduce the number of days being stored.
- After starting the new elasticsearch nodes make sure they show up in bigdesk
- Edit the db/sessions.json file and change the number_of_shards variable to match the new number of nodes
- Run the update.sh script
Turning on replication will consume twice the disk space on the nodes and increase the network bandwidth between nodes, so make sure you actually need replication.
To fix future days
- Edit the db/sessions.json file and change the number_of_replicas from 0 to 1
- Run the update.sh script
Make sure all the nodes are actually running by checking bigdesk. First of all you should make sure to wait at least 5-10 minutes after restarting before giving up. Most likely cause is the _state directory is missing. If you can live without the ENTIRE day that isn't going green the easiest solution is to use elastic head to just delete the day. http://moloches-machine:9200/_plugin/head/
If you want to try and recover the rest of the day then you need
- Find the machines with the missing index
- Check to see if the shard even exists (For example shard 4 on 120715 would live in /disk1/data/Moloch/nodes/0/indices/sessions-120715/4)
- If that directory is missing you need to create it by copying a empty version of the same directory from a temporary elastic search instance.
Most likely it isn't getting full access to the CPU and/or interrupts are messing up.
- Make sure you use taskset to give it its own CPU.
- Check that the CPU you are giving it isn't handling lots of interrupts (cat /proc/interrupts)
- Make sure other processes aren't using the same CPU as capture
Click on the owl