Logstash for solr logs


(Maddy) #1

I am trying to process solr logs using logstash, but the "solr.log" file contains logs from all the collections, i want log of one particular collection.
Can someone help?


(Jack ELK West) #2

Happy to help but what are you wanting help with? If you give a log file you want I'll be happy to see what I can do.


(Maddy) #3

Thanks for your response :slight_smile: PFA, in this case, we have more than one collection in the log file.
So I want the lines that has "somecollection1' and the rest should not be processed.

I used if condition in my logstash config file, but that didn't work. Please check the config.png and let me know if you need more input.


(Mark Walkom) #4

Providing the text rather than an image is much more helpful.


(Maddy) #5

I apologize, upload is working only with jpeg and png formats. I tried to upload .txt file, but that did not work.
Here's the sample log

INFO - 2015-11-10 01:32:15.689; org.apache.solr.update.processor.LogUpdateProcessor; [somecollection1_shard2_replica2] webapp=/solr path=/update params={someparams} 0 19
INFO - 2015-11-10 01:32:15.691; org.apache.solr.update.processor.LogUpdateProcessor; [somecollection1_shard2_replica2] webapp=/solr path=/update params={wt=javabin&version=2} 0 46
INFO - 2015-11-10 01:32:15.959; org.apache.solr.update.processor.LogUpdateProcessor; [somecollection2_shard3_replica2] webapp=/solr path=/update params={someparams} {add=[8000297011 0 0
INFO - 2015-11-10 01:32:15.960; org.apache.solr.update.processor.LogUpdateProcessor; [somecollection3_shard1_replica2] webapp=/solr path=/update params={wt=javabin&version=2} 0 5
INFO - 2015-11-10 01:32:16.232; org.apache.solr.update.processor.LogUpdateProcessor; [somecollection3_shard1_replica1] webapp=/solr path=/update params={someparams} 0 0


(system) #6