I am reeving json parse error when i am using json filter to parse my data.
my logstash config,
filter {
mutate {
gsub => [
"message", "^b_rooms_available_and_soldout...", "[",
"message", "],$", "]",
]
}
json {
source => "message"
}
}
My data is,
[{"b_id":50699001,"b_roomtype_id":9,"b_has_room_inventory":1,"b_name":"Deluxe Double Room","b_blocks":[{"b_mealplan_included_name":"breakfast","b_rate_is_cug_business_rate":0,"b_block_id":"50699001_179538328_2_41_0","b_max_persons":2,"b_stay_prices":[{"b_local_price":0,"b_raw_price":"","b_stays":0,"b_price":""},{"b_price":"LKR 19,962.80","b_stays":1,"b_raw_price":"19962.80","b_local_price":19962.800363943},{"b_price":"LKR 39,925.60","b_local_price":39925.600727886,"b_stays":2,"b_raw_price":"39925.60"},{"b_local_price":59888.401091829,"b_raw_price":"59888.40","b_stays":3,"b_price":"LKR 59,888.40"},{"b_local_price":79851.2014557721,"b_raw_price":"79851.20","b_stays":4,"b_price":"LKR 79,851.20"},{"b_price":"LKR 99,814","b_stays":5,"b_raw_price":"99814.00","b_local_price":99814.0018197151},{"b_stays":6,"b_raw_price":"119776.80","b_local_price":119776.802183658,"b_price":"LKR 119,776.80"}],"b_raw_price":"19962.80","b_nr_stays":6,"b_business_package_match":0,"b_price":"LKR 19,963","b_rate_is_genius":0,"b_cancellation_type":"non_refundable"},{"b_price":"LKR 29,037","b_rate_is_genius":0,"b_cancellation_type":"non_refundable","b_block_id":"50699001_179538328_2_25_0","b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"half_board","b_stay_prices":[{"b_local_price":0,"b_raw_price":"","b_stays":0,"b_price":""},{"b_price":"LKR 29,036.80","b_stays":1,"b_raw_price":"29036.80","b_local_price":29036.8005293717},{"b_stays":2,"b_raw_price":"58073.60","b_local_price":58073.6010587433,"b_price":"LKR 58,073.60"},{"b_raw_price":"87110.40","b_stays":3,"b_local_price":87110.401588115,"b_price":"LKR 87,110.40"},{"b_raw_price":"116147.20","b_stays":4,"b_local_price":116147.202117487,"b_price":"LKR 116,147.20"},{"b_local_price":145184.002646858,"b_raw_price":"145184.00","b_stays":5,"b_price":"LKR 145,184"},{"b_raw_price":"174220.80","b_stays":6,"b_local_price":174220.80317623,"b_price":"LKR 174,220.80"}],"b_max_persons":2,"b_raw_price":"29036.80","b_nr_stays":6,"b_business_package_match":0},{"b_nr_stays":6,"b_raw_price":"34481.20","b_business_package_match":0,"b_block_id":"50699001_179538328_2_21_0","b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"full_board","b_stay_prices":[{"b_price":"","b_raw_price":"","b_stays":0,"b_local_price":0},{"b_local_price":34481.2006286288,"b_stays":1,"b_raw_price":"34481.20","b_price":"LKR 34,481.20"},{"b_raw_price":"68962.40","b_stays":2,"b_local_price":68962.4012572577,"b_price":"LKR 68,962.40"},{"b_price":"LKR 103,443.60","b_raw_price":"103443.60","b_stays":3,"b_local_price":103443.601885887},{"b_price":"LKR 137,924.80","b_local_price":137924.802514515,"b_stays":4,"b_raw_price":"137924.80"},{"b_price":"LKR 172,406","b_local_price":172406.003143144,"b_raw_price":"172406.00","b_stays":5},{"b_local_price":206887.203771773,"b_stays":6,"b_raw_price":"206887.20","b_price":"LKR 206,887.20"}],"b_max_persons":2,"b_cancellation_type":"non_refundable","b_rate_is_genius":0,"b_price":"LKR 34,481"},{"b_nr_stays":6,"b_raw_price":"24499.80","b_business_package_match":0,"b_rate_is_cug_business_rate":0,"b_block_id":"50699001_179538328_3_41_0","b_mealplan_included_name":"breakfast","b_stay_prices":[{"b_local_price":0,"b_raw_price":"","b_stays":0,"b_price":""},{"b_local_price":24499.8004466573,"b_raw_price":"24499.80","b_stays":1,"b_price":"LKR 24,499.80"},{"b_price":"LKR 48,999.60","b_local_price":48999.6008933147,"b_stays":2,"b_raw_price":"48999.60"},{"b_local_price":73499.401339972,"b_raw_price":"73499.40","b_stays":3,"b_price":"LKR 73,499.40"},{"b_price":"LKR 97,999.20","b_local_price":97999.2017866293,"b_stays":4,"b_raw_price":"97999.20"},{"b_raw_price":"122499.00","b_stays":5,"b_local_price":122499.002233287,"b_price":"LKR 122,499"},{"b_local_price":146998.802679944,"b_raw_price":"146998.80","b_stays":6,"b_price":"LKR 146,998.80"}],"b_max_persons":3,"b_cancellation_type":"non_refundable","b_rate_is_genius":0,"b_price":"LKR 24,500"},{"b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"half_board","b_block_id":"50699001_179538328_3_25_0","b_max_persons":3,"b_stay_prices":[{"b_raw_price":"","b_stays":0,"b_local_price":0,"b_price":""},{"b_price":"LKR 36,296","b_raw_price":"36296.00","b_stays":1,"b_local_price":36296.0006617146},{"b_stays":2,"b_raw_price":"72592.00","b_local_price":72592.0013234291,"b_price":"LKR 72,592"},{"b_local_price":108888.001985144,"b_raw_price":"108888.00","b_stays":3,"b_price":"LKR 108,888"},{"b_price":"LKR 145,184","b_raw_price":"145184.00","b_stays":4,"b_local_price":145184.002646858},{"b_price":"LKR 181,480","b_local_price":181480.003308573,"b_stays":5,"b_raw_price":"181480.00"},{"b_local_price":217776.003970287,"b_raw_price":"217776.00","b_stays":6,"b_price":"LKR 217,776"}],"b_nr_stays":6,"b_raw_price":"36296.00","b_business_package_match":0,"b_rate_is_genius":0,"b_price":"LKR 36,296","b_cancellation_type":"non_refundable"},{"b_rate_is_genius":0,"b_price":"LKR 44,463","b_cancellation_type":"non_refundable","b_stay_prices":[{"b_price":"","b_raw_price":"","b_stays":0,"b_local_price":0},{"b_price":"LKR 44,462.60","b_stays":1,"b_raw_price":"44462.60","b_local_price":44462.6008106004},{"b_price":"LKR 88,925.20","b_stays":2,"b_raw_price":"88925.20","b_local_price":88925.2016212007},{"b_price":"LKR 133,387.80","b_stays":3,"b_raw_price":"133387.80","b_local_price":133387.802431801},{"b_local_price":177850.403242401,"b_raw_price":"177850.40","b_stays":4,"b_price":"LKR 177,850.40"},{"b_price":"LKR 222,313","b_local_price":222313.004053002,"b_stays":5,"b_raw_price":"222313.00"},{"b_price":"LKR 266,775.60","b_local_price":266775.604863602,"b_raw_price":"266775.60","b_stays":6}],"b_max_persons":3,"b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"full_board","b_block_id":"50699001_179538328_3_21_0","b_business_package_match":0,"b_nr_stays":6,"b_raw_price":"44462.60"}]},{"b_id":50699004,"b_roomtype_id":9,"b_blocks":[{"b_raw_price":"21777.60","b_nr_stays":1,"b_business_package_match":0,"b_rate_is_cug_business_rate":0,"b_block_id":"50699004_179538328_2_41_0","b_mealplan_included_name":"breakfast","b_stay_prices":[{"b_price":"","b_local_price":0,"b_raw_price":"","b_stays":0},{"b_price":"LKR 21,777.60","b_local_price":21777.6003970287,"b_raw_price":"21777.60","b_stays":1}],"b_max_persons":2,"b_cancellation_type":"non_refundable","b_price":"LKR 21,778","b_rate_is_genius":0},{"b_cancellation_type":"non_refundable","b_price":"LKR 30,852","b_rate_is_genius":0,"b_business_package_match":0,"b_raw_price":"30851.60","b_nr_stays":1,"b_max_persons":2,"b_stay_prices":[{"b_local_price":0,"b_raw_price":"","b_stays":0,"b_price":""},{"b_local_price":30851.6005624574,"b_raw_price":"30851.60","b_stays":1,"b_price":"LKR 30,851.60"}],"b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"half_board","b_block_id":"50699004_179538328_2_25_0"},{"b_max_persons":2,"b_stay_prices":[{"b_price":"","b_local_price":0,"b_raw_price":"","b_stays":0},{"b_price":"LKR 36,296","b_local_price":36296.0006617146,"b_stays":1,"b_raw_price":"36296.00"}],"b_rate_is_cug_business_rate":0,"b_block_id":"50699004_179538328_2_21_0","b_mealplan_included_name":"full_board","b_business_package_match":0,"b_raw_price":"36296.00","b_nr_stays":1,"b_price":"LKR 36,296","b_rate_is_genius":0,"b_cancellation_type":"non_refundable"},{"b_stay_prices":[{"b_local_price":0,"b_raw_price":"","b_stays":0,"b_price":""},{"b_local_price":26314.6004797431,"b_raw_price":"26314.60","b_stays":1,"b_price":"LKR 26,314.60"}],"b_max_persons":3,"b_rate_is_cug_business_rate":0,"b_block_id":"50699004_179538328_3_41_0","b_mealplan_included_name":"breakfast","b_business_package_match":0,"b_nr_stays":1,"b_raw_price":"26314.60","b_rate_is_genius":0,"b_price":"LKR 26,315","b_cancellation_type":"non_refundable"},{"b_rate_is_genius":0,"b_price":"LKR 38,111","b_cancellation_type":"non_refundable","b_stay_prices":[{"b_stays":0,"b_raw_price":"","b_local_price":0,"b_price":""},{"b_price":"LKR 38,110.80","b_stays":1,"b_raw_price":"38110.80","b_local_price":38110.8006948003}],"b_max_persons":3,"b_mealplan_included_name":"half_board","b_rate_is_cug_business_rate":0,"b_block_id":"50699004_179538328_3_25_0","b_business_package_match":0,"b_nr_stays":1,"b_raw_price":"38110.80"},{"b_cancellation_type":"non_refundable","b_rate_is_genius":0,"b_price":"LKR 46,277","b_business_package_match":0,"b_nr_stays":1,"b_raw_price":"46277.40","b_stay_prices":[{"b_price":"","b_local_price":0,"b_raw_price":"","b_stays":0},{"b_price":"LKR 46,277.40","b_local_price":46277.4008436861,"b_stays":1,"b_raw_price":"46277.40"}],"b_max_persons":3,"b_rate_is_cug_business_rate":0,"b_mealplan_included_name":"full_board","b_block_id":"50699004_179538328_3_21_0"}],"b_name":"Beach Chalet","b_has_room_inventory":1}]
Actually i am not getting any error message only the tag json_parse_failed and all the data in the message field.