# Statistics and Logs

## Statistics

This page shows basic stats about your content folder, as well as your most used tags.

## Logs

This page allows you to quickly see logs from the app, in case something went wrong.\
If you enable *Debug Mode* in Configuration, more logs will be displayed.

{% hint style="warning" %}
If you enable Debug Mode for troubleshooting purposes, make sure to disable it once you're done!
{% endhint %}

## Metrics

LANraragi supports exporting server metrics via the `/api/info/metrics` endpoint in the text-based Prometheus exposition format, allowing you to see server analytics and trendlines using a Prometheus/Grafana stack.

The `/api/info/metrics` endpoint is disabled by default. To enable this feature, go to the "Global Settings" configuration and toggle on "Enable Metrics". Then, restart the server.

Supported metrics include:

* Number of total archives and workers
* Number of requests handled and total request handling duration for a given endpoint and worker
* CPU, memory and file-descriptor statistics
* Miscellaneous server info (version, version name)

{% hint style="warning" %}
Due to the metrics exporter relying on Redis as its shared memory store, the collection process may apply a high write pressure to the database which can overwhelm its [default persistence configurations](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#snapshotting).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sugoi.gitbook.io/lanraragi/dev/basic-operations/stats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
