aiagent/skill/embedded/builtin/query-datasource/datasources/victorialogs.md
victorialogsCall the native VictoriaLogs API through the proxy.
GET /api/n9e/proxy/<datasource_id>/select/logsql/query?query=<logsql>&start=<unix_ts>&end=<unix_ts>&limit=100
Authorization: Bearer <token>
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | LogsQL query expression |
start | int64 | No | Start time, Unix timestamp (seconds) |
end | int64 | No | End time, Unix timestamp (seconds) |
limit | int | No | Number of log lines to return |
| Requirement | LogsQL |
|---|---|
| Search logs containing error | _msg:error |
| Multiple conditions with AND | _msg:error AND service:payment |
| Filter by time stream | _stream:{job="myapp"} AND _msg:error |
| Exclude a keyword | _msg:error NOT _msg:debug |
| Regex match | _msg:~"timeout|refused" |
_msg