Fail to pass data from logstash to ES

The output conf in the logstash conf file is

output {
    elasticsearch {
      hosts => ["10.28.1.17:9200"]
      index => "event-%{+YYYY.MM.dd}"
    }
}

I run the logstash in CLI with output as stdout {codec => rubydebug }
I can see the log printed.
I have another conf file for a different source, it can pass logs to ES with the same output configure.
When I run logstash in CLI, I don't see any error logs, but just no new data in ES.
What can be the cause?

What is the rest of your Logstash config?