mcp-victorialogs
v1.8.0MCP Server for VictoriaLogs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
documentation
Search documentation resources for the given search query, returning the URIs of the resources that match the search criteria sorted by relevance. This tool can help to get context for any VictoriaLogs related question.
| Parameter | Type | Description |
|---|---|---|
query * | string | Query for search (for example, list of keywords) |
limit | number | Maximum number of results to return |
facets
The most frequent values per each log field seen in the logs returned by the given <query> on the given [<start> ... <end>] time range. This tool uses `/select/logsql/facets` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
end * | string | End timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
query * | string | LogsQL expression for the query of the logs data |
start * | string | Start timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
keep_const_fields | boolean | By default the facets tool doesn’t return log fields, which contain the same constant value across all the logs matching the given query. Add keep_const_fields=true arg if you need such log fields |
limit | number | The number of values per each log field can be controlled via limit arg. |
max_value_len | number | The facets tool ignores log fields, which contain too long values. The limit on the per-field value length can be controlled via max_value_len arg. |
max_values_per_field | number | The facets tool ignores log fields, which contain too big number of unique values, since they can consume a lot of RAM to track. The limit on the number of unique values per each log field can be cont… |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
field_names
Get field names from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every field name. This tool uses `/select/logsql/field_names` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
field_values
Get unique values for the given <fieldName> field from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every field value. This tool uses `/select/logsql/field_values` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
field * | string | Field name of for getting field values. |
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
limit | number | The maximum number of returned values. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
flags
List of non-default flags (parameters) of the VictoriaLogs instance. This tools uses `/flags` endpoint of VictoriaLogs API.
hits
The number of matching log entries for the given <query> on the given [<start> ... <end>] time range grouped by <step> buckets. The returned results are sorted by time. This tool uses `/select/logsql/hits` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs data |
start * | string | Start timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
end | string | End timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
field | array | Additionally, any number of field=<field_name> args can be passed to /select/logsql/hits for grouping hits buckets by the mentioned <field_name> fields. The grouped fields are put inside 'fields' obje… |
fields_limit | number | Optional fields_limit=N query arg can be passed for limiting the number of unique 'fields' groups to return to N. If more than N unique 'fields' groups is found, then top N 'fields' groups with the ma… |
step | string | The step is used to group the log entries by time. For example, 60s means that the log entries counts will be grouped by 1 minute bucket. Default is 1d. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
query
Executes LogsQL query expression to search log entries. This tool uses `/select/logsql/query` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs data |
start * | string | Start timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
end | string | End timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z |
limit | number | The maximum number of log entries, which can be returned in the response |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
timeout | string | Optional query timeout. For example, timeout=5s. Query is canceled when the timeout is reached. |
stats_query
Log stats for the given query at the given timestamp (time) in the format compatible with Prometheus querying API. This tool uses `/select/logsql/stats_query` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the | stats by(...) pipe. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
time | string | Time in RFC3339. If it's missing, then it equals to the current time. |
stats_query_range
Log stats for the given query on the given [start ... end] time range with the given step interval. The stats is returned in the format compatible with Prometheus querying API. This tool uses `/select/logsql/stats_query_range` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the | stats by(...) pipe. |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
step | string | Step interval for returning the stats. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
stream_field_names
Get log stream field names from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every field name.. This tool uses `/select/logsql/stream_field_names` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
stream_field_values
Get unique values for the given <fieldName> field from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every field value. This tool uses `/select/logsql/stream_field_values` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
field * | string | Field name of log stream for getting field values. |
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
stream_ids
Get _stream_id values for the log streams from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every _stream_id. This tool uses `/select/logsql/stream_ids` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |
streams
Get log streams from results of the given <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every _stream. This tool uses `/select/logsql/streams` endpoint of VictoriaLogs API.
| Parameter | Type | Description |
|---|---|---|
query * | string | LogsQL expression for the query of the logs streams |
start * | string | Start timestamp in RFC3339 |
end | string | End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. |
tenant | string | Name of the tenant for which the data will be displayed (format AccountID:ProjectID) |