

# Using metrics to diagnose stale manifests from AWS Elemental MediaTailor
<a name="stale-manifest-diagnose"></a>

A stale manifest is one that hasn't been recently updated. Different ad insertion workflows could have varying tolerance to how long must pass before a manifest is considered stale, based on a variety of factors (such as requirements for downstream systems). You can use Amazon CloudWatch metrics to identify manifests that exceed the staleness tolerance for your workflow, and help identify what could be causing the delays in manifest updates. 

The following metrics help identify stale manifests and their causes.

For information about all metrics that MediaTailor emits, see [AWS Elemental MediaTailor CloudWatch metrics](monitoring-cloudwatch-metrics.md#metrics).


| Metric | Definition | Use | 
| --- | --- | --- | 
| GetManifest.Age |  Measures the total age of the manifest, including both `GetManifest.MediaTailorAge` and `Origin.Age` for this configuration.   |  You can use this metric to identify manifests that are past your update threshold and are stale.  Set alarms on this metric so that you're alerted when stale manifests are being served. For information about alarms, see [Alarming on metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ConsoleAlarms.html) in the *Amazon CloudWatch User Guide.* When you receive an alarm, use `Origin.Age` and `GetManifest.MediaTailorAge` to identify if MediaTailor or the origin is causing the staleness.   | 
| Origin.Age | Measures how long the origin has the manifest before sending it to MediaTailor for this configuration.This metric is not emitted when the response comes from a content delivery network (CDN). The response must come from the origin for `Origin.Age` to be emitted.  |  When you identify stale manifests with `GetManifest.Age`, you can analyze the `Origin.Age` metric and the `GetManifest.MediaTailorAge` metric to determine which is contributing to manifest staleness.  If you find that `Origin.Age` is longer than your typical processing times at the origin, it's likely that the upstream system is causing the issue and you should focus diagnostics there.   | 
| GetManifest.MediaTailorAge | Measures how long MediaTailor has stored this manifest for this configuration. |  When you identify stale manifests with `GetManifest.Age`, you can analyze the `GetManifest.MediaTailorAge` metric and the `Origin.Age` metric to determine which is contributing to manifest staleness.  If the `GetManifest.MediaTailorAge` is longer than your typical manifest personalization times in MediaTailor, it's likely that MediaTailor is causing the issue and you should focus diagnostics there.  `GetManifest.Latency` can further identify how long it takes for MediaTailor to create a personalized manifest.  | 
| GetManifest.Latency | Measures the amount of time it takes for MediaTailor to process the request and create a personalized manifest for this configuration.  |  When you compare `Origin.Age` and `GetManifest.MediaTailorAge` and determine that MediaTailor is the cause of delayed manifest delivery, you can analyze the `GetManifest.Latency` metric to determine if the manifest personalization process is contributing to manifest staleness.  `GetManifest.MediaTailorAge` measures the total time that the manifest is stored in MediaTailor. `GetManifest.Latency` measures how much of that storage time is MediaTailor personalizing the manifest in response to a request.  | 