파라미터
[INPUT]
Path /home/ec2-user/app.log # 로그 파일의 경로를 지정. 와일드카드를 사용할 수 있고 ","로 구분된 여러 패턴도 허용.
Path_key app # 활성화 된 경우 파일의 이름이 레코드의 일부로 추가됨
Parser my_parser # 레코드를 파싱할 파서를 지정한다.
Db test.db # 서비스가 꺼져도 직전 로그를 저장해 놓는 db를 생성해 기억해 놓는다.
[1] my_tail: [1691492020.145607788, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:53:40,145] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[0] my_tail: [1691492031.903495061, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:53:51,903] 127.0.0.1 - - GET /v1/color/
red HTTP/1.1 200"}]
[1] my_tail: [1691492032.249564115, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:53:52,249] 127.0.0.1 - - GET /v1/color/
red HTTP/1.1 200"}]
[0] my_tail: [1691492033.247682716, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:53:53,247] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[0] my_tail: [1691492041.442740106, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:01,442] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[1] my_tail: [1691492041.649881203, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:01,649] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[2] my_tail: [1691492041.826789573, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:01,826] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[3] my_tail: [1691492042.071677359, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:02,071] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[4] my_tail: [1691492042.300867020, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:02,300] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[0] my_tail: [1691492042.457593143, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:02,457] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[1] my_tail: [1691492042.659361920, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:02,659] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]
[2] my_tail: [1691492042.838935597, {"true"=>"/var/logf/app.log", "log"=>"[2023-08-08 10:54:02,838] 127.0.0.1 - - GET /v1/color/
orange HTTP/1.1 200"}]