Created
September 27, 2018 11:05
-
-
Save zxkane/61b73ce1f2cef287dbd3b9edc4fdbf1c to your computer and use it in GitHub Desktop.
nginx ingress log configuration sample of aliyun log service, only collect json format log in stdout of docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inputs": [ | |
{ | |
"detail": { | |
"ExcludeLabel": {}, | |
"IncludeEnv": { | |
"app": "nginx-ingress" | |
}, | |
"IncludeLabel": {}, | |
"Stderr": false | |
}, | |
"type": "service_docker_stdout" | |
} | |
], | |
"processors": [ | |
{ | |
"detail": { | |
"Exclude": { | |
"content": "^[^{][\\s\\S]*[^}]$" | |
} | |
}, | |
"type": "processor_filter_regex" | |
}, | |
{ | |
"detail": { | |
"Anchors": [ | |
{ | |
"ExpondJson": false, | |
"FieldName": "", | |
"FieldType": "json", | |
"Start": "", | |
"Stop": "" | |
} | |
], | |
"KeepSource": false, | |
"SourceKey": "content" | |
}, | |
"type": "processor_anchor" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment