> ## Documentation Index
> Fetch the complete documentation index at: https://ormilabs.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to monitor your subgraph

> Learn how to monitor your subgraph syncing progress and logs after deployment.

## Start here

<Frame>
  <img src="https://mintcdn.com/ormilabs/vcU9W8gg4MUmMgRt/images/how-to/monitor-subgraph.png?fit=max&auto=format&n=vcU9W8gg4MUmMgRt&q=85&s=85aadd85ea313403b14ac485da51a2f0" alt="0xGraph graph init" width="1895" height="883" data-path="images/how-to/monitor-subgraph.png" />

  <figcaption>API Keys</figcaption>
</Frame>

1. Go to the [Ormi app](https://app.ormilabs.com/dashboard/0xgraph).
2. Select the subgraph you want to monitor.
3. Click on the `>_` icon of the subgraph card to open the detailed view.

## Syncing status

<Frame>
  <img src="https://mintcdn.com/ormilabs/vcU9W8gg4MUmMgRt/images/how-to/monitor-subgraph3.png?fit=max&auto=format&n=vcU9W8gg4MUmMgRt&q=85&s=c6a09f2d28699069a352374136a1932a" alt="0xGraph graph init" width="1431" height="745" data-path="images/how-to/monitor-subgraph3.png" />

  <figcaption>API Keys</figcaption>
</Frame>

When you deploy a subgraph on 0xGraph, its state is tracked in the mainframe.

A subgraph can be in one of the following states:

* `Syncing` - The subgraph is currently indexing blocks and catching up to the chain head.
* `Live` - The subgraph is fully synced and serving queries in real time.
* `Pause` - Indexing is temporarily stopped. Queries may still return existing data. The pause function is a manual toggle and the subgraph owner can pause the subgraph at any time.
* `Error` - The subgraph encountered a problem during indexing. Check logs for details.

## View analytics

<Frame>
  <img src="https://mintcdn.com/ormilabs/vcU9W8gg4MUmMgRt/images/how-to/monitor-subgraph2.png?fit=max&auto=format&n=vcU9W8gg4MUmMgRt&q=85&s=116c3dc4f54bfc97376cf2c1ec70ad14" alt="0xGraph graph init" width="2063" height="1098" data-path="images/how-to/monitor-subgraph2.png" />

  <figcaption>API Keys</figcaption>
</Frame>

The Analytics tab provides key performance metrics at a glance. You can adjust the interval **(hourly, daily)** to analyze trends.

* **Count** - number of processed requests.
* **Latency** - Average response time in milliseconds.
* **Response data size** - Average size of responses returned.
* **Block head count** - The current block height the subgraph has synced to.
* **Entity count** - Total number of entities stored.
* **Indexing speed** - Rate of block / entity ingestion over time.

## Monitoring logs

The logs provides a detailed runtime information for you subgraph. Logs are essential for debugging, monitoring performance, and identifying issues in your mappings or indexing process.

You can filter logs by **minimum log level** and **time range** to narrow down what you're looking for or use the **search function** to look up specific events, txn hashes, or handlers.

Minimum log levels are defined as:

* `Debug` - Detailed technical logs for development and troubleshooting. Best for diagnosing specific issues in mappings or schema.
* `Info` - Standard operational logs showing normal indexing activity. Use to confirm your subgraph is progressing as expected.
* `Warn` - Alerts for unusual behavior that doesn’t stop syncing but may affect performance or data accuracy. Check the underlying log details to confirm if action is needed.
* `Error` - Critical issues that stop or block indexing. Always investigate the logs directly to identify the cause and resolve the failure.

## Tips for monitoring

* **Track syncing progress**: Compare the subgraph's block head with the chain's latest block. Large gaps may indicate indexing lag.
* **Watch for errors**: Check logs regularly for failed handlers, out-of-gas errors, or schema mismatches.
* **Monitor performance**: Use latency and indexing speed metrics to anticipate scaling needs.

## Subgraph maintennce

Keep in mind that errors don’t always come from infrastructure issues - subgraphs themselves require ongoing maintenance. Protocol upgrades, new contract deployments, or schema changes may cause your subgraph to break or return incomplete data if not updated.

Regularly review your subgraph mappings and schema, and plan to maintain them as the underlying protocol evolves.
