I am able to put time in pmmmmm=> startTime0 how to convert it to time?

I am able to put time in pmmmmm=> startTime0 how to convert it to time?
Thanks a lot

    "pmmmmm" => {
                "ShPNR" => 0.0,
    "RelayShPNRNoRoute" => 0.0,
       "RelayRcvdShPNR" => 0.0,
          "pmContainer" => "CSCF-1/COMMON-1/SH-1",
     "pmNetworkElement" => "network_element",
      "measurementType" => "SH",
           "startTime0" => "2019-02-07T23:45:00.000-03:00:00"
}

Use a date filter to parse [pmmmmm][startTime0]

Thanks

"startTime0" => "2019-02-07T23:45:00.000"

    date {
            match => [ "[pmmmmm][startTime0]", "YYYY-MM-DD HH:MM:SS.SSS" ]
            timezone =>  "UTC"
    }

but still get [1] "_dateparsefailure"

I have change starttime0 3 format all does not work
"2019-02-07T23:45:00.000-03:00:00"
"2019-02-07T23:45:00.000"
"2019-02-07 23:45:00.000"

Your orginal startTime0 should be something like below.

date {
            match => [ "[pmmmmm][startTime0]", "YYYY-MM-DDTHH:MM:SS.SSS-HH:MM:SS" ]
            timezone =>  "UTC"
    }

In your second startTime0 example you can add the format to the initial match like so.

date {
            match => [ "[pmmmmm][startTime0]", "YYYY-MM-DDTHH:MM:SS.SSS-HH:MM:SS", "YYYY-MM-DDTHH:MM:SS.SSS", "YYYY-MM-DD HH:MM:SS.SSS" ]
            timezone =>  "UTC"
    }

Have a read here on date match

works. thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.