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

# VictoriaLogs

> VictoriaLogs provider allows you to query logs from VictoriaLogs.

## Overview

VictoriaLogs is open source user-friendly database for logs from VictoriaMetrics. It is optimized for high performance and low memory usage. It can handle high cardinality and high volume of logs.

Note: To add authentication VMAuth should be configured. For more information, refer to the [VMauth documentation](https://docs.victoriametrics.com/vmauth/).

## Authentication

This provider requires authentication.

* **host\_url**: VictoriaLogs Host URL (required: True, sensitive: False)
* **authentication\_type**: Authentication Type (required: True, sensitive: False)
* **username**: HTTP basic authentication - Username (required: False, sensitive: False)
* **password**: HTTP basic authentication - Password (required: False, sensitive: True)
* **bearer\_token**: Bearer Token (required: False, sensitive: True)
* **x\_scope\_orgid**: X-Scope-OrgID Header (required: False, sensitive: False)
* **insecure**: Skip TLS verification (required: False, sensitive: False)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

* **authenticated**: The instance is valid and the user is authenticated

## In workflows

This provider can be used in workflows.

As "step" to query data, example:

```yaml theme={null}
steps:
    - name: Query victorialogs
      provider: victorialogs
      config: "{{ provider.my_provider_name }}"
      with:
        queryType: {value}  
        query: {value}  
        time: {value}  
        start: {value}  
        end: {value}  
        step: {value}  
        account_id: {value}  
        project_id: {value}  
        limit: {value}  
        timeout: {value}  
```

Check the following workflow example:

* [query\_victorialogs.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/query_victorialogs.yaml)

### NoAuth

* No additional parameters are required, only the `Grafana Loki Host URL` is required.

### HTTP basic authentication

* `HTTP basic authentication - Username`: The username to use for HTTP basic authentication.
* `HTTP basic authentication - Password`: The password to use for HTTP basic authentication.

### Bearer

* `Bearer Token` : The bearer token to use for authentication.
* `X-Scope-OrgID Header`: The organization ID to use for VictoriaLogs Multi-tenancy support. (Optional)

## Querying VictoriaLogs

The VictoriaLogs provider allows you to query logs from VictoriaLogs through the `query`, `hits`, `stats_query` and `stats_query_range` types. The following are the parameters available for querying:

1. `query` type:

   * `query`: This is the query to perform.
   * `limit`: The max number of matching entries to return.
   * `timeout`: The query timeout in seconds.
   * `AccountID`: The account ID to use for VictoriaLogs.
   * `ProjectID`: The project ID to use for VictoriaLogs.

2. `hits` type:

   * `query`: This is the query to perform.
   * `start`: The start time for the query.
   * `end`: The end time for the query.
   * `step`: The step for the query.
   * `AccountID`: The account ID to use for VictoriaLogs.
   * `ProjectID`: The project ID to use for VictoriaLogs.

3. `stats_query` type:

   * `query`: This is the query to perform.
   * `time`: The evaluation time for the query.

4. `stats_query_range` type:

   * `query`: This is the query to perform.
   * `start`: The start time for the query.
   * `end`: The end time for the query.
   * `step`: The step for the query.

## Useful Links

* [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/)
* [VMauth documentation](https://docs.victoriametrics.com/vmauth/)
