scalyr_power_query
Run PowerQuery expressions to aggregate, group, and filter logs for analytics-style investigations, using relative or absolute time ranges.
Instructions
Run a Scalyr PowerQuery expression for advanced aggregation, grouping, and filtering. Use this for analytics-style queries.
Examples:
$serverHost == "bank-cron" level == "ERROR" | group count() by status
$logfile == "/var/log/app.log" | group count(), avg(duration) by endpoint | sort -count
level == "ERROR" | columns timestamp, message, $serverHost
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": {
"query": "<query>",
"startTime": "<startTime>"
},
"name": "scalyr_power_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | PowerQuery expression including filter and pipe stages | |
| endTime | No | End of time range. Defaults to now | |
| startTime | Yes | Start of time range. Relative (e.g. '60m', '24h', '7d') or absolute timestamp |