As you told me i tried dissect filter
dissect {
mapping => {
"content" => "%{query} %{+command} %{+ninserted} %{+keyUpdates} %{+writeConflicts} %{+numYields} %{+reslen} %{+locks} %{+database} %{+collection} %{+protocol} [%{pid}]: %{content}"
}
}
and it is giving output as
"context" => "conn6",
"reslen" => "\"zips\","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 14 }, timeAcquiringMicros: {
W: 9529 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 81ms\r"
,
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.146Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn2",
"reslen" => ""zips","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 2 }, timeAcquiringMicros: { W
: 1723 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 12ms\r",
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.147Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn2",
"reslen" => "\"zips\","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 8 }, timeAcquiringMicros: { W
: 4354 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 17ms\r",
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.147Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn6",
"reslen" => "\"zips\","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 11 }, timeAcquiringMicros: {
W: 6108 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 18ms\r"
,
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.147Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn3",
"reslen" => ""zips","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 16 }, timeAcquiringMicros: {
W: 9847 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 19ms\r"
,
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.147Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn5",
"reslen" => ""zips","
}
{
"severity" => "I",
"numYields" => "insert:",
"query" => "command",
"pid" => "",
"collection" => "documents:",
"locks" => "ordered:",
"content" => "1000 } ninserted:1000 keyUpdates:0 writeConflicts:0 num
Yields:0 reslen:40 locks:{ Global: { acquireCount: { r: 16, w: 16 } }, Database:
{ acquireCount: { W: 16 }, acquireWaitCount: { W: 12 }, timeAcquiringMicros: {
W: 8421 } }, Collection: { acquireCount: { w: 16 } } } protocol:op_query 17ms\r"
,
"command" => "admin.zips",
"tags" => [],
"path" => "C:/Data/log/mongodb2.log",
"writeConflicts" => "{",
"component" => "COMMAND",
"database" => "false,",
"protocol" => "",
"@timestamp" => 2017-03-16T06:41:29.148Z,
"ninserted" => "command:",
"keyUpdates" => "insert",
"@version" => "1",
"host" => "Admin-PC",
"context" => "conn2",
"reslen" => ""zips","
}
but the values are not exact