Logging

MongoDB를 구동하는 상황에서 발생하는 동작에 대한 로그를 분석하여 동작방식, 에러 유무, 등의 유지보수 작업을 진행할 수 있다.

Types of Logging

MongoStat

MongoDB에서 지원하는 유틸리티로 MongoDB가 동작하는 내부 상황에 대한 정보를 확인하기 위한 툴이다. 1초에 한번씩, mongod, mongos의 성능을 측정하며, db 내부에서 발생하는 insert, find, 등의 다양한 이벤트에 대한 정보와 메모리 상태에 대한 정보를 확인할 수 있다.

mongostat을 활용하여 알 수 있는 정보는 아래와 같다.

Field Description
inserts 초당 insert 수
query 초당 query 수
update 초당 update 수
delete 초당 delete 수
getmore 초당 발생작업 수
command slave을 포함하여 초당 실행되는 명령어 수
flushes 초당 fsync flush 되는 수
locked write lock이 발생하는 비율
faults 초당 발생하는 페이지 폴트 수
qr 데이터 읽기를 기다리는 query 길이
qw 데이터 쓰기를 기다리는 query 길이

이외에도 docs를 확인하면 field에 대한 정보를 확인할 수 있다.

mongostat에서 가장 중요한 지표는 locked, faults, qr/w로, page-fault 횟수가 증가하고 서비스의 지연이 발생하는 상황일 때, full-scan query의 실행 가능성을 짐작할 수 있고, 쓰기 요청이 증가함에 따라 qr 수치가 높아지면서 읽기 대기 중인 상태가 많아지는 것으로 서비스 지연 가능성을 확인할 수 있다.

실행 결과

(base) PS C:\Windows\System32> mongostat --rowcount 10
insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn                time
    *0    *0     *0     *0       0     0|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   111b   60.1k    8 Jan 16 10:35:45.460
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   112b   60.7k    8 Jan 16 10:35:46.456
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   240b   60.2k    8 Jan 16 10:35:47.466
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   112b   60.8k    8 Jan 16 10:35:48.461
    *0    *0     *0     *0       0     2|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   167b   61.1k    8 Jan 16 10:35:49.456
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   112b   60.6k    8 Jan 16 10:35:50.454
    *0    *0     *0     *0       0     0|0  0.0% 0.2%       1 6.60G 103M 0|0 0|0   110b   59.9k    8 Jan 16 10:35:51.464
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   112b   60.6k    8 Jan 16 10:35:52.462
    *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   112b   60.8k    8 Jan 16 10:35:53.456
    *0    *0     *0     *0       0     2|0  0.0% 0.2%       0 6.60G 103M 0|0 0|0   318b   60.5k    8 Jan 16 10:35:54.466

MongoTop

리눅스에서 process의 동작환경을 확인하는 top과 유사한 명령어로, db instance 내의 모든 collection에 대한 read/write를 확인 가능하다. stat과 달리 비교적 간단한 정보들을 확인하기 위해 활용된다.

Field Description
ns DB+collection 형태로 이루어진 이름
total mongod가 해당 collection에 수행한 작업의 총 시간
read mongod가 해당 collection에 수행한 읽기 작업의 총 시간
write mongod가 해당 collection에 수행한 쓰기 작업의 총 시간

실행 결과

//5초마다 분석 결과 확인
(base) PS C:\Windows\System32> mongotop 5
2023-01-16T10:51:35.465+0900    connected to: mongodb://localhost/

                    ns    total    read    write    2023-01-16T10:51:40+09:00
  admin.system.version      0ms     0ms      0ms
config.system.sessions      0ms     0ms      0ms
   config.transactions      0ms     0ms      0ms
  local.system.replset      0ms     0ms      0ms
           test.phones      0ms     0ms      0ms
           test.things      0ms     0ms      0ms

                    ns    total    read    write    2023-01-16T10:51:45+09:00
  admin.system.version      0ms     0ms      0ms
config.system.sessions      0ms     0ms      0ms
   config.transactions      0ms     0ms      0ms
  local.system.replset      0ms     0ms      0ms
           test.phones      0ms     0ms      0ms
           test.things      0ms     0ms      0ms

                    ns    total    read    write    2023-01-16T10:51:50+09:00
  admin.system.version      0ms     0ms      0ms
config.system.sessions      0ms     0ms      0ms
   config.transactions      0ms     0ms      0ms
  local.system.replset      0ms     0ms      0ms
           test.phones      0ms     0ms      0ms
           test.things      0ms     0ms      0ms

compass monitoring

Compass Tool을 활용하여 mongostat, mongotop의 정보를 gui 환경에서 확인할 수 있다.

compass_monitoring

Web Monitoring

위의 방식들은 DB가 동작하는 서버에서 활용되는 분석 툴이다. 한 대 이상의 서버에서 동작하는 NoSQL의 특성상 접근성이 높은 웹 기반의 모니터링 환경도 기본적으로 제공한다.

rest option은 mongodb 3.6 이후로 deprecated 되었다.

File Logging

실시간으로 mongodb의 상태를 확인하는 것도 가능하지만, 모든 동자을 실시간으로 확인하는 것은 불가능하기 때문에 로그를 파일 형태로 저장하여 장애가 발생하는 경우나 정기 점검시 활용이 가능하다.

실행

기존에 MongoDB를 실행할 때, 로그 파일에 대한 경로를 지정하여 db가 동작할 때 로그를 기록하도록 하였다.

mongodb instance을 실행할 때, logpath을 지정해주면 로그 파일을 해당 경로에 생성해서 로그를 수집한다.

storage:
    dbPath: C:\Program Files\MongoDB\db
    journal:
        enabled: true
#  engine:
#  wiredTiger:

# where to write logging data.
systemLog:
    destination: file
    logAppend: true
    path:  C:\Program Files\MongoDB\db\log\logs.log

# network interfaces
net:
    port: 27017
    bindIp: 127.0.0.1

logs.log

{"t":{"$date":"2023-01-16T10:04:41.395+09:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn2","msg":"Slow query","attr":{"type":"command","ns":"test.phones","appName":"mongosh 1.6.1","command":{"aggregate":"phones","pipeline":[{"$match":{"components.number":{"$gt":5599999}}},{"$group":{"_id":"$components.area","count":{"$sum":1}}},{"$project":{"components.area":1,"count":1}},{"$sort":{"_id":-1}},{"$limit":5}],"cursor":{},"lsid":{"id":{"$uuid":"44274053-a10f-445a-9a95-dd5c86e64d29"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":200000,"hasSortStage":true,"cursorExhausted":true,"numYields":200,"nreturned":2,"queryHash":"734C7628","planCacheKey":"734C7628","queryFramework":"sbe","reslen":156,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":202}},"Global":{"acquireCount":{"r":202}},"Mutex":{"acquireCount":{"r":2}}},"storage":{},"remote":"127.0.0.1:52613","protocol":"op_msg","durationMillis":110}}
{"t":{"$date":"2023-01-16T10:07:34.453+09:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn2","msg":"Slow query","attr":{"type":"command","ns":"test.phones","appName":"mongosh 1.6.1","command":{"aggregate":"phones","pipeline":[{"$match":{"components.number":{"$gt":5599999}}},{"$group":{"_id":"$components.area","count":{"$sum":"$_id"}}},{"$project":{"components.area":1,"count":1}},{"$sort":{"_id":-1}},{"$limit":5}],"cursor":{},"lsid":{"id":{"$uuid":"44274053-a10f-445a-9a95-dd5c86e64d29"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":200000,"hasSortStage":true,"cursorExhausted":true,"numYields":200,"nreturned":2,"queryHash":"9755C97E","planCacheKey":"9755C97E","queryFramework":"sbe","reslen":164,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":202}},"Global":{"acquireCount":{"r":202}},"Mutex":{"acquireCount":{"r":2}}},"storage":{},"remote":"127.0.0.1:52613","protocol":"op_msg","durationMillis":115}}
{"t":{"$date":"2023-01-16T10:08:12.947+09:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn2","msg":"Slow query","attr":{"type":"command","ns":"test.phones","appName":"mongosh 1.6.1","command":{"aggregate":"phones","pipeline":[{"$match":{"components.number":{"$gt":5599999}}},{"$group":{"_id":"$components.area","count":{"$sum":"_id"}}},{"$project":{"components.area":1,"count":1}},{"$sort":{"_id":-1}},{"$limit":5}],"cursor":{},"lsid":{"id":{"$uuid":"44274053-a10f-445a-9a95-dd5c86e64d29"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":200000,"hasSortStage":true,"cursorExhausted":true,"numYields":200,"nreturned":2,"queryHash":"734C7628","planCacheKey":"734C7628","queryFramework":"sbe","reslen":156,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":202}},"Global":{"acquireCount":{"r":202}},"Mutex":{"acquireCount":{"r":2}}},"storage":{},"remote":"127.0.0.1:52613","protocol":"op_msg","durationMillis":110}}
{"t":{"$date":"2023-01-16T10:08:41.880+09:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn2","msg":"Slow query","attr":{"type":"command","ns":"test.phones","appName":"mongosh 1.6.1","command":{"aggregate":"phones","pipeline":[{"$match":{"components.number":{"$gt":5599999}}},{"$group":{"_id":"$components.area","count":{"$sum":"$components.area"}}},{"$project":{"components.area":1,"count":1}},{"$sort":{"_id":-1}},{"$limit":5}],"cursor":{},"lsid":{"id":{"$uuid":"e29d1802-a800-4df6-8a40-8e4338c2ad7a"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":200000,"hasSortStage":true,"cursorExhausted":true,"numYields":200,"nreturned":2,"queryHash":"734C7628","planCacheKey":"734C7628","queryFramework":"sbe","reslen":156,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":202}},"Global":{"acquireCount":{"r":202}},"Mutex":{"acquireCount":{"r":2}}},"storage":{},"remote":"127.0.0.1:52613","protocol":"op_msg","durationMillis":109}}
{"t":{"$date":"2023-01-16T10:35:34.446+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54614","uuid":"ccfd1587-7f2e-4e6b-b1d8-e726a26e251e","connectionId":6,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:35:34.446+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54615","uuid":"657456f2-b6cd-43a6-b960-39a8bab767cd","connectionId":7,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:35:34.447+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn7","msg":"client metadata","attr":{"remote":"127.0.0.1:54615","client":"conn7","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:34.447+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn6","msg":"client metadata","attr":{"remote":"127.0.0.1:54614","client":"conn6","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:34.761+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54617","uuid":"dcfb8090-ee0d-4fb9-99e8-1ff3b1a94848","connectionId":8,"connectionCount":8}}
{"t":{"$date":"2023-01-16T10:35:34.762+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn8","msg":"client metadata","attr":{"remote":"127.0.0.1:54617","client":"conn8","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:41.521+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn7","msg":"Connection ended","attr":{"remote":"127.0.0.1:54615","uuid":"657456f2-b6cd-43a6-b960-39a8bab767cd","connectionId":7,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:35:41.521+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn8","msg":"Connection ended","attr":{"remote":"127.0.0.1:54617","uuid":"dcfb8090-ee0d-4fb9-99e8-1ff3b1a94848","connectionId":8,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:35:41.550+09:00"},"s":"W",  "c":"NETWORK",  "id":4615610, "ctx":"conn6","msg":"Failed to check socket connectivity","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"}}}
{"t":{"$date":"2023-01-16T10:35:41.550+09:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn6","msg":"Interrupted operation as its client disconnected","attr":{"opId":1628579}}
{"t":{"$date":"2023-01-16T10:35:41.550+09:00"},"s":"I",  "c":"NETWORK",  "id":22989,   "ctx":"conn6","msg":"Error sending response to client. Ending connection from remote","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"},"remote":"127.0.0.1:54614","connectionId":6}}
{"t":{"$date":"2023-01-16T10:35:41.550+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn6","msg":"Connection ended","attr":{"remote":"127.0.0.1:54614","uuid":"ccfd1587-7f2e-4e6b-b1d8-e726a26e251e","connectionId":6,"connectionCount":5}}
{"t":{"$date":"2023-01-16T10:35:44.146+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54621","uuid":"88e568ca-2d45-40e5-bd3f-4cd327e7fea7","connectionId":9,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:35:44.146+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54620","uuid":"2c72ea3c-98d9-42e9-a6f1-2ae82fb73c8d","connectionId":10,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:35:44.147+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn9","msg":"client metadata","attr":{"remote":"127.0.0.1:54621","client":"conn9","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:44.147+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn10","msg":"client metadata","attr":{"remote":"127.0.0.1:54620","client":"conn10","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:44.449+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54623","uuid":"4d084942-afec-4925-a89b-7ab9bece43ec","connectionId":11,"connectionCount":8}}
{"t":{"$date":"2023-01-16T10:35:44.450+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn11","msg":"client metadata","attr":{"remote":"127.0.0.1:54623","client":"conn11","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:35:54.468+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn9","msg":"Connection ended","attr":{"remote":"127.0.0.1:54621","uuid":"88e568ca-2d45-40e5-bd3f-4cd327e7fea7","connectionId":9,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:35:54.468+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn11","msg":"Connection ended","attr":{"remote":"127.0.0.1:54623","uuid":"4d084942-afec-4925-a89b-7ab9bece43ec","connectionId":11,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:35:55.249+09:00"},"s":"W",  "c":"NETWORK",  "id":4615610, "ctx":"conn10","msg":"Failed to check socket connectivity","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection closed by peer"}}}
{"t":{"$date":"2023-01-16T10:35:55.249+09:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn10","msg":"Interrupted operation as its client disconnected","attr":{"opId":1628852}}
{"t":{"$date":"2023-01-16T10:35:55.250+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn10","msg":"Connection ended","attr":{"remote":"127.0.0.1:54620","uuid":"2c72ea3c-98d9-42e9-a6f1-2ae82fb73c8d","connectionId":10,"connectionCount":5}}
{"t":{"$date":"2023-01-16T10:38:09.305+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54640","uuid":"4d06cd80-fcb3-4890-b12e-dce1fc93b854","connectionId":12,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:38:09.305+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54639","uuid":"2a5787f5-b324-4cc5-8a86-9dddd4272805","connectionId":13,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:38:09.305+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn12","msg":"client metadata","attr":{"remote":"127.0.0.1:54640","client":"conn12","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:38:09.306+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn13","msg":"client metadata","attr":{"remote":"127.0.0.1:54639","client":"conn13","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:38:09.620+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54642","uuid":"ed01bb9a-75fc-4146-a2da-7fb7bf8aed01","connectionId":14,"connectionCount":8}}
{"t":{"$date":"2023-01-16T10:38:09.621+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn14","msg":"client metadata","attr":{"remote":"127.0.0.1:54642","client":"conn14","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongostat"}}}}
{"t":{"$date":"2023-01-16T10:38:19.629+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn12","msg":"Connection ended","attr":{"remote":"127.0.0.1:54640","uuid":"4d06cd80-fcb3-4890-b12e-dce1fc93b854","connectionId":12,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:38:19.629+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn14","msg":"Connection ended","attr":{"remote":"127.0.0.1:54642","uuid":"ed01bb9a-75fc-4146-a2da-7fb7bf8aed01","connectionId":14,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:38:20.407+09:00"},"s":"W",  "c":"NETWORK",  "id":4615610, "ctx":"conn13","msg":"Failed to check socket connectivity","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection closed by peer"}}}
{"t":{"$date":"2023-01-16T10:38:20.407+09:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn13","msg":"Interrupted operation as its client disconnected","attr":{"opId":1630694}}
{"t":{"$date":"2023-01-16T10:38:20.407+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn13","msg":"Connection ended","attr":{"remote":"127.0.0.1:54639","uuid":"2a5787f5-b324-4cc5-8a86-9dddd4272805","connectionId":13,"connectionCount":5}}
{"t":{"$date":"2023-01-16T10:48:35.132+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54908","uuid":"1ac8e776-e469-4eac-9303-f606ae856038","connectionId":15,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:48:35.133+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54909","uuid":"ee450791-be98-4d07-8cf4-8cbce42eb9dc","connectionId":16,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:48:35.134+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn15","msg":"client metadata","attr":{"remote":"127.0.0.1:54908","client":"conn15","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:48:35.134+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn16","msg":"client metadata","attr":{"remote":"127.0.0.1:54909","client":"conn16","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:48:35.448+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54911","uuid":"2b9efa9a-f093-4946-9153-71fb928b73a8","connectionId":17,"connectionCount":8}}
{"t":{"$date":"2023-01-16T10:48:35.449+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn17","msg":"client metadata","attr":{"remote":"127.0.0.1:54911","client":"conn17","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:48:41.934+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn16","msg":"Connection ended","attr":{"remote":"127.0.0.1:54909","uuid":"ee450791-be98-4d07-8cf4-8cbce42eb9dc","connectionId":16,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:48:41.934+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn17","msg":"Connection ended","attr":{"remote":"127.0.0.1:54911","uuid":"2b9efa9a-f093-4946-9153-71fb928b73a8","connectionId":17,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:48:42.239+09:00"},"s":"W",  "c":"NETWORK",  "id":4615610, "ctx":"conn15","msg":"Failed to check socket connectivity","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"}}}
{"t":{"$date":"2023-01-16T10:48:42.239+09:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn15","msg":"Interrupted operation as its client disconnected","attr":{"opId":1638372}}
{"t":{"$date":"2023-01-16T10:48:42.239+09:00"},"s":"I",  "c":"NETWORK",  "id":22989,   "ctx":"conn15","msg":"Error sending response to client. Ending connection from remote","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"},"remote":"127.0.0.1:54908","connectionId":15}}
{"t":{"$date":"2023-01-16T10:48:42.239+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn15","msg":"Connection ended","attr":{"remote":"127.0.0.1:54908","uuid":"1ac8e776-e469-4eac-9303-f606ae856038","connectionId":15,"connectionCount":5}}
{"t":{"$date":"2023-01-16T10:51:35.148+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54975","uuid":"6c268cb2-822d-425c-b8e6-43acc116f215","connectionId":18,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:51:35.148+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54974","uuid":"76f02f52-96bd-4684-8a5f-2253f6f9c0fe","connectionId":19,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:51:35.148+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn18","msg":"client metadata","attr":{"remote":"127.0.0.1:54975","client":"conn18","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:51:35.149+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn19","msg":"client metadata","attr":{"remote":"127.0.0.1:54974","client":"conn19","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:51:35.464+09:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:54977","uuid":"e9a7ce28-c114-437f-bc2a-172ff2bf4971","connectionId":20,"connectionCount":8}}
{"t":{"$date":"2023-01-16T10:51:35.465+09:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn20","msg":"client metadata","attr":{"remote":"127.0.0.1:54977","client":"conn20","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.3"},"os":{"type":"windows","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongotop"}}}}
{"t":{"$date":"2023-01-16T10:51:50.948+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn18","msg":"Connection ended","attr":{"remote":"127.0.0.1:54975","uuid":"6c268cb2-822d-425c-b8e6-43acc116f215","connectionId":18,"connectionCount":7}}
{"t":{"$date":"2023-01-16T10:51:50.948+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn20","msg":"Connection ended","attr":{"remote":"127.0.0.1:54977","uuid":"e9a7ce28-c114-437f-bc2a-172ff2bf4971","connectionId":20,"connectionCount":6}}
{"t":{"$date":"2023-01-16T10:51:51.252+09:00"},"s":"W",  "c":"NETWORK",  "id":4615610, "ctx":"conn19","msg":"Failed to check socket connectivity","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"}}}
{"t":{"$date":"2023-01-16T10:51:51.252+09:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn19","msg":"Interrupted operation as its client disconnected","attr":{"opId":1640758}}
{"t":{"$date":"2023-01-16T10:51:51.252+09:00"},"s":"I",  "c":"NETWORK",  "id":22989,   "ctx":"conn19","msg":"Error sending response to client. Ending connection from remote","attr":{"error":{"code":6,"codeName":"HostUnreachable","errmsg":"Connection reset by peer"},"remote":"127.0.0.1:54974","connectionId":19}}
{"t":{"$date":"2023-01-16T10:51:51.252+09:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn19","msg":"Connection ended","attr":{"remote":"127.0.0.1:54974","uuid":"76f02f52-96bd-4684-8a5f-2253f6f9c0fe","connectionId":19,"connectionCount":5}}

References

댓글남기기