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

# Victoria Metrics

Victoria Metrics is an open-source, high-performance, and scalable time-series database and monitoring solution designed for handling large volumes of time-series data with a focus on efficiency and low resource consumption.

The integration between **Victoria Metrics** and **Togai** requires only a one-time setup. Follow the steps below:

## Install

* Navigate to the Integrations section from the left navigation bar in Togai
* Click on `Apps` to access the list of apps with integration support
* Select `Victoria Metrics` from the available apps
* Click on the `+Add connection` button
* Provide a name for the connection and paste your:
  * `Base URL`

### Base URL

<img src="https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/docs/integrations/images/victoria-metrics-vmui-table-screen.png?fit=max&auto=format&n=gpDI_SmUijp8C7vA&q=85&s=7b802165620f7556f526580fbaaae302" alt="Victoria Metrics Graph Screen" width="3452" height="2160" data-path="docs/integrations/images/victoria-metrics-vmui-table-screen.png" />

* Obtain the network address of your Victoria Metrics instance. This is the address you use to access the Victoria Metrics server. It is usually in the format `http://<victoria-metrics-server-ip>:<victoria-metrics-service-port>`. For example, `http://localhost:8428` when running locally.
* Paste the network address in the `Base URL` field in Togai.

<Tip>
  In order to access the Victoria Metrics server from outside the local network, you need to expose the Victoria Metrics server port. You can use a tool like [ngrok](https://ngrok.com/) to expose the Victoria Metrics server port.
</Tip>

## Flows

### 1. Ingest data from Victoria Metrics

* The flow can be triggered by on demand triggered.
* Create flow connection by choosing the appropriate app connections from the dropdown.
  <img src="https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/docs/integrations/images/prometheus-trigger-now-btn.png?fit=max&auto=format&n=gpDI_SmUijp8C7vA&q=85&s=cffdbff37cb6fec0f854e837328f04a4" alt="Trigger Now Button" width="2962" height="1434" data-path="docs/integrations/images/prometheus-trigger-now-btn.png" />
* Once the flow connection is created, navigate to `Flow connections` on the top navigation bar and click on the `Trigger now` button to trigger the flow.
  <img src="https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/docs/integrations/images/prometheus-trigger-payload.png?fit=max&auto=format&n=gpDI_SmUijp8C7vA&q=85&s=d0a5fbf676bd6f3a8f9d36800aecc09d" alt="Trigger Payload" width="1526" height="1248" data-path="docs/integrations/images/prometheus-trigger-payload.png" />
* The flow takes an array of queries:
  * `query`: The query to be executed on the Victoria Metrics server, usually the remaining part of the URL after the base URL.
  * `schemaKey`: The schema key to be used to map the data from Victoria Metrics to the Togai Event Schema.
  * `accountKey`: The account key to be used to map the data to corresponding Togai Accounts to which the data belongs to.
  * `attributeName`: The attribute name of a Togai Event Schema to which the queried data should be mapped to.
* The flow will ingest the data from Victoria Metrics as events into Togai.
