Ingest logs
ingest_logsIngest log entries from Serilog, Elasticsearch, SQLite, or flat files into one searchable source for analysis, with replace or append modes for repeat imports.
Instructions
Ingest log entries from a data source (Serilog CLEF/JSON, Elasticsearch dump or live endpoint, SQLite database, or flat text file). Re-ingesting a source with the same name replaces its previous entries unless mode is "append".
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "ingest_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | replace (default) drops earlier entries from a source with the same name; append keeps them | |
| name | No | Friendly name for this source (defaults to path or endpoint) | |
| path | No | File path to the log file or database (not needed for live Elasticsearch) | |
| index | No | Elasticsearch index name or pattern (default *) | |
| limit | No | Max documents to fetch from live Elasticsearch (default and max 10000) | |
| table | No | Table name for the sql adapter (default Logs) | |
| filter | No | Filter: SQL WHERE clause for sql, query_string for elastic | |
| source | Yes | Log source adapter type | |
| pattern | No | Custom regex for flatfile with groups (timestamp)(level)(message) or named groups | |
| endpoint | No | Elasticsearch base URL for live queries, e.g. http://localhost:9200. Credentials are only sent if it matches a configured source or ELASTIC_URL |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| errors | Yes | ||
| source | Yes | ||
| skipped | Yes | ||
| ingested | Yes | ||
| replaced | Yes | ||
| warnings | Yes | ||
| totalInStore | Yes |