Datetime from sql to Timestamp logstash

I tried it, but without changes.

my output -

26

Anuar, from this point I don’t have any more suggestions for you besides asking you to analyze carefully your debug log and read the docs once again. Also, what always help me is to start a fresh config file, use the stdin input plugin, no filters to start with, output to stdout and paste only the data you are trying to parse onto console. From there, build my filters configuration piece by piece.

It will make it easier to pinpoint the problem. Also reread all this topic, I think you are missing something. Good luck!

Ok, but last question, may be it is beacause of i use jdbc plugin input?

Hello, i found how to do it)
It turns out logstash does not understand that datetime it is date value.
Need before convert this field to string -

filter {
    mutate {
	add_field => { "message" => "%{typenameru}" }
        convert => [ "datetime", "string" ]
}
date {
    timezone => "Etc/GMT-6"
    match => ["datetime" , "ISO8601", "yyyy-MM-dd HH:mm:ss.SSS"]
    target => "@timestamp"
    remove_field => [ "datetime", "timestamp" ]
}
}
3 Likes

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