Last active
August 21, 2019 10:52
-
-
Save megastef/c111d2eff1266b4eea05a2552a97635d to your computer and use it in GitHub Desktop.
This file contains 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
options: | |
printStats: 60 | |
suppress: true | |
geoipEnabled: true | |
diskBufferDir: /tmp/sematext-logagent | |
input: | |
docker: | |
module: docker-logs | |
socket: /var/run/docker.sock | |
labelFilter: com.docker.*,io.kubernetes.*,annotation.* | |
parser: | |
patternFiles: | |
- /etc/logagent/patterns.yml | |
outputFilter: | |
dockerEnrichment: | |
module: docker-enrichment | |
autodetectSeverity: true | |
backward_compatible_field_name: | |
module: !!js/function > | |
function (context, config, eventEmitter, data, callback) { | |
// debug: dump data to error stream | |
// console.error(data.labels) | |
if (data.labels && data.labels['com_docker_swarm_service_name']) { | |
data.swarm_service_name = data.labels ['com_docker_swarm_service_name'] | |
// data.swarm_service_id = data.labels ['com_docker_swarm_service_id'] | |
// data.swarm_task_name = data.labels ['com_docker_swarm_task_name'] | |
} | |
callback(null, data) | |
} | |
output: | |
logsene: | |
module: elasticsearch | |
url: https://logsene-receiver.sematext.com | |
index: MY_LOGS_TOKEN | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment