Logstash output creating error

logstash starup pt2

[2021-11-03T10:07:13,883][DEBUG][logstash.agent           ] Starting agent
[2021-11-03T10:07:13,913][DEBUG][logstash.agent           ] Starting puma
[2021-11-03T10:07:13,924][DEBUG][logstash.agent           ] Trying to start WebServer {:port=>9600}
[2021-11-03T10:07:13,966][DEBUG][logstash.config.source.multilocal] Reading pipeline configurations from YAML {:location=>"/etc/logstash/pipelines.yml"}
[2021-11-03T10:07:13,972][DEBUG][logstash.api.service     ] [api-service] start
[2021-11-03T10:07:14,107][DEBUG][logstash.config.source.local.configpathloader] Skipping the following files while reading config since they don't match the specified glob pattern {:files=>["/etc/logstash/conf.d/metricbeat/2-wds-metricbeat-filter.conf.old", "/etc/logstash/conf.d/metricbeat/3-wds-metricbeat-output.conf.old", "/etc/logstash/conf.d/metricbeat/98-fail-filter.conf.old", "/etc/logstash/conf.d/metricbeat/99-fail-output.conf.old", "/etc/logstash/conf.d/metricbeat/test.conf.old"]}
[2021-11-03T10:07:14,114][DEBUG][logstash.config.source.local.configpathloader] Reading config file {:config_file=>"/etc/logstash/conf.d/metricbeat/1-wds-metricbeat.conf"}
[2021-11-03T10:07:14,153][DEBUG][org.logstash.config.ir.PipelineConfig] -------- Logstash Config ---------
[2021-11-03T10:07:14,157][DEBUG][org.logstash.config.ir.PipelineConfig] Config from source, source: LogStash::Config::Source::MultiLocal, pipeline_id:: metricbeat
[2021-11-03T10:07:14,157][DEBUG][org.logstash.config.ir.PipelineConfig] Config string, protocol: file, id: /etc/logstash/conf.d/metricbeat/1-wds-metricbeat.conf
[2021-11-03T10:07:14,158][DEBUG][org.logstash.config.ir.PipelineConfig] 

input {
    beats {
        port => 2598
        type => "wds-metricbeat-input"
    }
}

filter {
    if [type] == "wds-metricbeat-input" {
        mutate{ add_field =>{"[@metadata][target_index]"=> "ecs-metricbeat-%{+YYYY.MM.dd}"}}
}

output {
        elasticsearch {
            hosts => "http://10.0.60.60:9200"
            user => "logstash_system"
            password => "6EnArfBZ6OZtL2ncpkHQ"
            index => "%{[@metadata][target_index]}"
        }
}
[2021-11-03T10:07:14,158][DEBUG][org.logstash.config.ir.PipelineConfig] Merged config
[2021-11-03T10:07:14,158][DEBUG][org.logstash.config.ir.PipelineConfig] 

input {
    beats {
        port => 2598
        type => "wds-metricbeat-input"
    }
}

filter {
    if [type] == "wds-metricbeat-input" {
        mutate{ add_field =>{"[@metadata][target_index]"=> "ecs-metricbeat-%{+YYYY.MM.dd}"}}
}

output {
        elasticsearch {
            hosts => "http://10.0.60.60:9200"
            user => "logstash_system"
            password => "6EnArfBZ6OZtL2ncpkHQ"
            index => "%{[@metadata][target_index]}"
        }
}
[2021-11-03T10:07:14,218][DEBUG][logstash.agent           ] Converging pipelines state {:actions_count=>1}
[2021-11-03T10:07:14,227][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2021-11-03T10:07:14,234][DEBUG][logstash.agent           ] Executing action {:action=>LogStash::PipelineAction::Create/pipeline_id:metricbeat}
[2021-11-03T10:07:14,992][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:metricbeat, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"=>\" at line 14, column 23 (byte 268) after filter {\n    if [type] == \"wds-metricbeat-input\" {\n        mutate{ add_field =>{\"[@metadata][target_index]\"=> \"ecs-metricbeat-%{+YYYY.MM.dd}\"}}\n}\n\noutput {\n        elasticsearch ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:391:in `block in converge_state'"]}
[2021-11-03T10:07:18,482][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
[2021-11-03T10:07:18,485][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}