# Monitoring

The AWS Console can be used to monitor Tilores.

## Tilores Dashboard

Tilores creates a CloudWatch dashboard with the most relevant metrics.

### Accessing The Dashboard
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. In the navigation pane, choose Dashboards.
Choose the dashboard for your Tilores instance `*-tilores-dashboard`.

### Tilores Metrics Explained

The dashboard shows the number of invocations ,errors and other key metrics for the most important lambda functions.
The API Lambda invocations include the query, mutation and introspection requests.
The Assemble Lambda invocations is a good indicator for the data ingestion progress, where when it goes to zero
then it is an indication that the ingestion is complete. It is expected to have some Assemble Lambda errors where it
can happen in case two lambdas are trying to modify the same entity at the same time. In this case the lambda fails
with an error and retries at a later point.

Furthermore, the dashboard shows metrics for the two data streams. One is the Raw Data stream, which is for all the data ingested
into Tilores to be assembled asynchronously. The other is the [Entity stream](api.md#entity-event-stream).
the metric `GetRecords.IteratorAge` is important for detecting if there is a need to
[increase the number of shards](deployment.md#shard-count). If the age continues to grow for more than 1 hour
then it is an indication that the data submission rate is higher than the assembly rate, which means that either
increasing the number of shards or reducing the submission rate is required to avoid data loss.

The Entity and Record count metrics are also shown. They are only updated once every 6 hours.

## Metrics Using GraphQL API
Some metrics are available to query through the GraphQL API. Such as [Assembly Status](api.md#assembly-status)

## Other Metrics

Other Tilores resource metrics are made available through [AWS CloudWatch Console](https://console.aws.amazon.com/dynamodb/home) 
where it is possible to
[create graphs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph_a_metric.html) and
[dashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create_dashboard.html).

!!! info
All Tilores resources include `tilores` in their names.
!!!
