Sorry about that. I am new to discussion forums. Initially I was talking about Ubuntu Linux which I was running on my Virtual Machine (Virtualbox). Unfortunately, that has crashed. I have now installed Logstash on my original Windows environment. Following are the details of my trial:
In Windows Powershell, I ran this command:
.\bin\logstash -f grok_trial.conf
I got the following output:
Sending Logstash's logs to C:/Users/prati/Desktop/ELK/logstash/logs which is now configured via log4j2.properties
[2017-09-19T11:10:26,223][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"C:/Users/prati/Desktop/ELK/logstash/modules/fb_apache/configuration"}
[2017-09-19T11:10:26,230][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"C:/Users/prati/Desktop/ELK/logstash/modules/netflow/configuration"}
[2017-09-19T11:10:26,712][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
[2017-09-19T11:10:27,046][INFO ][logstash.pipeline ] Pipeline main started
[2017-09-19T11:10:27,177][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
The contents of grok_trial.conf are:
input {
file {
path => ["C:\Users\prati\Desktop\CE_Training\singlejson.json"]
start_position => "beginning"
type => "json"
}
}
output {
stdout {
codec => "rubydebug"
}
}
The contents of the file singlejson.json are:
{"prodId":"00583BE8-BE33-E011-BF97-001018721196","vendorName":"Omega","vendorId":"212770E7-E633-E011-BF97-001018721196","model":"DishStar®","categoryName":"Blender, Food, Countertop","fob":{"city":"Ft. Lauderdale","state":"FL","zip":"33331"},"spec":"Omega Blender, 48 oz. Tritan coopolyester BPA-Free container, toggle control with high/low speed, heavy duty locking ring, recessed coupling system, removable stainless steel blade assembly, silver, 1 HP, 600 watts, CE, ETL","listPrice":164.0,"netPrice":0.0,"numPerCase":1,"sellingUnit":"ea","shippingCube":0.0,"shippingWeight":7.0,"freightClass":"85","height":15.5,"width":8.0,"depth":7.0,"catalogItem":true,"multiplier":0,"hideModel":false,"callForPricing":false,"pictureId":"9B6AC60C-CF96-4858-BF6E-02A0F91E2FAA","cutSheetId":"D01FB5BA-A9E0-4B43-B4D4-568FED71A2BD","hasConfig":true,"configAccessories":"ZZOMEGASHIP1;ZZWARRANTY03;ZZOMEGAVLT02A01;ZZOMEGAVLT02A02A;","values":[{"property":"Motor HP","value":" 1 HP"},{"property":"Motor speed","value":"2-speed"},{"property":"Exterior Finish","value":"polycarbonate"},{"property":"Capacity","value":" 32 - 95 oz (1 - 2 qt)"},{"property":"Blender Type","value":"removable plastic container"}],"certifications":[{"text":"CE"},{"text":"ETL"}],"utils":{"electrical":[{"order":1,"amps":"","kw":".6","hp":"1","mca":"","mocp":"","voltage":"","cycle":"","nema":"","remarks":"","phase":"*","electricalConnectionHeight":"","connectionType":""}]},"changeState":"added"}