roles:
- role: logstash
logstash_configs:
00_mesos: |
input {
file {
path => ["/var/log/mesos/mesos-slave.INFO"]
exclude => ["*.log.*", "*.gz"]
tags => ["infra", "mesos", "mesos-slave"]
add_field => { "level" => "INFO" }
}
file {
path => ["/var/log/mesos/mesos-slave.WARN"]
exclude => ["*.log.*", "*.gz"]
tags => ["infra", "mesos", "mesos-slave"]
add_field => { "level" => "WARN" }
}
file {
path => ["/var/log/mesos/mesos-slave.ERROR"]
exclude => ["*.log.*", "*.gz"]
tags => ["infra", "mesos", "mesos-slave"]
add_field => { "level" => "ERROR" }
}
}
00_consul: |
input {
file {
type => "consul"
path => ["/var/log/consul.log"]
exclude => ["*.log.*", "*.gz"]
tags => ["consul"]
}
}
00_vimana: |
input {
file {
type => "vimana"
path => ["{{vi_log_dir}}/*.log"]
exclude => ["*.log.*", "*.gz"]
tags => ["vimana"]
codec => json
}
}
50_env_filter: |
filter {
add_field => { "env", "{{env}}" }
}
99_rabbitmq_output: |
output {
rabbitmq {
host => "rabbitmq.service.ops.consul"
port => {{rabbitmq_port}}
user => "{{elk_rabbitmq_logstash_user}}"
password => "{{elk_rabbitmq_logstash_password}}"
vhost => "logstash"
exchange => "logs_json"
exchange_type => "direct"
durable => true
}
}
99_debug_output: |
output {
stdout {
codec => rubydebug
}
}--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e62754db-0316-46c9-b983-c5cf85719493%40googlegroups.com.
I used to just make them templates, keep the file in native format
and only template out the options that vary per my different
classifications (stage, location, purpose).
Yep, I think that is a good pattern as well. With your permission, when I have enough time I will add that example to the repo, or you can do it by yourself if you want :-)