Skip to content

Instantly share code, notes, and snippets.

@zxkane
Created September 27, 2018 11:05
Show Gist options
  • Save zxkane/61b73ce1f2cef287dbd3b9edc4fdbf1c to your computer and use it in GitHub Desktop.
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
{
"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