My applications publishes logs in the following format:
[2018-06-17 21:39:14.779] [root] [info] The rest of message
I would like to extract the @timestamp from the log message. So I created the following pipeline in elasticsearch:
    PUT  _ingest/pipeline/test-pipeline 
    {
        "description": "log_parsing",
        "processors": [
          {
            "date": {
              "field": "message",
              "target_field": "@timestamp",
              "formats": [
                "yyyy-MM-dd hh:mm:ss.ms"
              ]
            }
          }
        ],
        "on_failure": [
        {
          "set": {
            "field": "error.message",
            "value": "{{ _ingest.on_failure_message }}"
          }
        }
        ]
      }
However, I get the "Invalid format error". Could you please let me know what is the wrong with the pipeline definition?