Bug #60676 Add rule to monitor if the timezone info is loaded
Submitted: 28 Mar 2011 13:59 Modified: 21 Jul 2011 22:20
Reporter: Daniël van Eeden Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S4 (Feature request)
Version:2.3.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution, patch, timezone

[28 Mar 2011 13:59] Daniël van Eeden
Description:
Monitor if the required data is loaded for the CONVERT_TZ fuction to work correctly.

How to repeat:
See Description.

Suggested fix:
= Data query =
<class>
		<namespace>mysql</namespace>
		<classname>tzdata_available</classname>
		<query><![CDATA[SELECT CONVERT_TZ(NOW(),'GMT','MET') IS NOT NULL AS 'tzdata_available']]></query>
	</class>

http://daniel-database.blogspot.com/2011/03/mysql-timezone-support-updating-and.html

= Rule Definition =
Rule Name: Timezone data is not loaded.
Expression: %tzdata_avail% == THRESHOLD
Critical: 0
Variable Assignment
Variable: %tzdata_avail%
Data Item: mysql:tzdata_available:tzdata_available
Instance: local
Default Frequency: 30 minutes

Problem Description: "There is no timezone info loaded in mysql. This causes the CONVERT_TZ() function to return NULL instead of the requested conversion."

Advice: "None Specified"

Recommended Action: "Use the mysql_tzinfo_to_sql utility to convert the zoneinfo database to SQL and load the converted data into the mysql database."
Links and Further Reading:
* {moreInfo:mysql_tzinfo_to_sql — Load the Time Zone Tables|http://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html}
* {moreInfo:MySQL Server Time Zone Support|http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html}
[28 Mar 2011 14:02] Daniël van Eeden
added the Contribution tag
[28 Mar 2011 15:37] Valeriy Kravchuk
Thank you for the feature request and implementation contributed.
[21 Jul 2011 22:21] John Russell
Added to 2.3.5 changelog:

A rule was added to check if the MySQL instance contains time zone
data required for the CONVERT_TZ function to work properly. See ... for
background information about time zone support, and ... for the utility
to load time zone data into MySQL.