检测配置
代码语言:javascript
复制[root@h102 etc]# /opt/logstash/bin/logstash -f logstash-for-mongo.conf -t
Configuration OK
[root@h102 etc]#
运行logstash
代码语言:javascript
复制[root@h102 etc]# /opt/logstash/bin/logstash -f logstash-for-mongo.conf
Settings: Default filter workers: 1
Logstash startup completed
...
...
...
输入测试
代码语言:javascript
复制2015-12-25T18:41:47.683 0800 I CONTROL [signalProcessingThread] db version v3.0.3
{
"message" => "2015-12-25T18:41:47.683 0800 I CONTROL [signalProcessingThread] db version v3.0.3",
"@version" => "1",
"@timestamp" => "2015-12-25T10:41:47.683Z",
"host" => "h102.temp",
"timestamp" => "2015-12-25T18:41:47.683 0800",
"severity" => "I",
"component" => "CONTROL",
"context" => "signalProcessingThread",
"body" => "db version v3.0.3"
}
2015-12-25T20:54:11.336 0800 I JOURNAL [journal writer] old journal file will be removed: /var/lib/mongo/journal/j._177
{
"message" => "2015-12-25T20:54:11.336 0800 I JOURNAL [journal writer] old journal file will be removed: /var/lib/mongo/journal/j._177",
"@version" => "1",
"@timestamp" => "2015-12-25T12:54:11.336Z",
"host" => "h102.temp",
"timestamp" => "2015-12-25T20:54:11.336 0800",
"severity" => "I",
"component" => "JOURNAL",
"context" => "journal writer",
"body" => "old journal file will be removed: /var/lib/mongo/journal/j._177"
}
2015-12-26T00:46:36.512 0800 I COMMAND [conn424487] command feed_test_repo.$cmd command: geoNear { geoNear: "users", near: [ 88.598884, 44.102866 ], query: {}, num: 30, maxDistance: 10 } keyUpdates:0 writeConflicts:0 numYields:399 reslen:37700 locks:{ Global: { acquireCount: { r: 400 } }, MMAPV1Journal: { acquireCount: { r: 400 } }, Database: { acquireCount: { r: 400 } }, Collection: { acquireCount: { R: 400 } } } 2584ms
{
"message" => "2015-12-26T00:46:36.512 0800 I COMMAND [conn424487] command feed_test_repo.$cmd command: geoNear { geoNear: "users", near: [ 88.598884, 44.102866 ], query: {}, num: 30, maxDistance: 10 } keyUpdates:0 writeConflicts:0 numYields:399 reslen:37700 locks:{ Global: { acquireCount: { r: 400 } }, MMAPV1Journal: { acquireCount: { r: 400 } }, Database: { acquireCount: { r: 400 } }, Collection: { acquireCount: { R: 400 } } } 2584ms",
"@version" => "1",
"@timestamp" => "2015-12-25T16:46:36.512Z",
"host" => "h102.temp",
"timestamp" => "2015-12-26T00:46:36.512 0800",
"severity" => "I",
"component" => "COMMAND",
"context" => "conn424487",
"body" => "command feed_test_repo.$cmd command: geoNear { geoNear: "users", near: [ 88.598884, 44.102866 ], query: {}, num: 30, maxDistance: 10 } keyUpdates:0 writeConflicts:0 numYields:399 reslen:37700 locks:{ Global: { acquireCount: { r: 400 } }, MMAPV1Journal: { acquireCount: { r: 400 } }, Database: { acquireCount: { r: 400 } }, Collection: { acquireCount: { R: 400 } } } 2584ms",
"spend_time" => 2584
}