Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input { pipeline { address => my_main_pipeline } }
- filter {
- mutate {
- copy => { "[log][file][path]" => "log_file_path" }
- }
- }
- output {
- elasticsearch {
- index => "i-my_index-%{[fields][project]}-%{[fields][instance]}-%{[fields][tenant]}-%{[fields][context]}-%{[fields][subcontext]}-%{+yyyy.MM.dd}"
- cloud_id => "${MY_ELASTIC_CLOUD_ID}"
- cloud_auth => "${MY_ELASTIC_CLOUD_AUTH}"
- }
- if [fields][subcontext] == "my_metrics" {
- file {
- path => "<PATH TO USE. DESIRABLY, I'D USE [log][file][path] HERE, BUT THE PATH ISSUE IS MAKING IT IMPOSSIBLE FOR ME>"
- codec => line { format => "{\"Timestamp\": \"%{Timestamp}\", \"Timezone\": \"%{Timezone}\", \"Body\": %{Body} "}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement