Logstash converts the @timestamp time to the local time.

Logstash converts the @timestamp time to the local time. If the local time zone is the Beijing time zone, add the following filter to solve the problem.

Filter {
         Ruby {
            Code => "event.set('mytime', (event.get('@timestamp').time.localtime + 8*60*60).strftime('%Y-%m-%d %H:%M :%S'))"
         }
         Date {
         Match => [ "mytime","yyyy-MM-dd HH:mm:ss" ]
         }
}

Remember, date { match => [ “mytime”,”yyyy-MM-dd HH:mm:ss” ] } can’t be less

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 68 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.