mysqld_exporter icon indicating copy to clipboard operation
mysqld_exporter copied to clipboard

Fixed parsing of timestamps with non-zero padded days

Open baldowl opened this issue 1 year ago • 0 comments

👋 @SuperQ

After rotating some certificates last week, mysql_global_status_ssl_server_not_after metric stopped working. It turned out that the new certificates had expiration dates like Jun 3 14:02:39 2024 GMT (single digit day, non-zero padded) and parsing it returned ~negative results.~ (sorry, it was the end of a long day and while trying to be concise I mixed up some early testing results with the real behavior) an error:

parsing time "Jun  3 14:02:39 2024 GMT" as "Jan 02 15:04:05 2006 MST": cannot parse "3 14:02:39 2024 GMT" as "02"

baldowl avatar May 20 '24 16:05 baldowl