How to update an anomaly detection monitor to account for local time zone
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter
Datadog monitors use UTC time, which by default does not track local time zones. Depending on the type of system you have, your data could be impacted by local activity happening in your time zone. For example, a lunch surge could cause a spike in the middle of the day, and this surge could be detected as an unexpected anomaly. If you are getting unexpected anomalies caused by local activity, update your anomaly detection monitor to account for your local timezone.
If you are using the agile or robust anomaly detection algorithms with weekly or daily seasonality, you can update your anomaly detection monitor to account for a local timezone using both the API and the UI.
Here is an example of a monitor before it is set to account for a local timezone:
Here is an example of a monitor when daylight savings time is being taken into account:
To update an anomaly detection monitor to account for a local timezone in the UI, navigate to the Create a new monitor > Anomaly monitor section in the UI. In section 3, Set Alert Conditions, open the Advanced panel and toggle on the switch to take daylight savings into account while evaluating the monitor. Then, set the timezone dropdown to match the timezone you want tracked.
- You need the following information to make the update request through the monitor API:
- Your Datadog API key and application key for authentication
- The monitor ID and query from your anomaly detection monitor:
- The TZ identification string for the time zone related to your metric, for example
Europe/Paris. Locate your preferred time zone in the TZ column on the List of tz database time zones (canonical format recommended).
- Create an updated version of the monitor query by adding a
timezone argument to the anomalies() function call.
- Use the Edit a Monitor API to update the monitor’s definition.
- Examples are available in Python, Ruby, and cURL.
- Only include the ID and query in the request to avoid overriding existing settings. The name, message, options, and tags are not required.
Documentation, liens et articles supplémentaires utiles: