Get Counter Trend
get_counter_trendRetrieves historical counter values over a time range to analyze performance trends. Supports metrics like TPS, CPU, and memory, with auto-precision and sampling for large datasets.
Instructions
Get historical counter values over a time range for trend analysis. Supports TPS, ElapsedTime, HeapUsed, ProcCpu, GcCount, Cpu, Mem, and more. Use latest_sec for quick recent data (e.g., last 60s), or start_time/end_time for custom ranges. Auto-selects precision: 2-second for <=2h, 5-minute for >2h. Large datasets are auto-sampled.
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": {
"counter": "<counter>"
},
"name": "get_counter_trend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| counter | Yes | Counter name: TPS, ElapsedTime, Elapsed90%, ActiveService, ErrorRate, HeapUsed, HeapTotal, ProcCpu, GcCount, GcTime, Cpu, Mem, etc. | |
| end_time | No | End time. Defaults to now. | |
| obj_type | No | Object type filter (e.g., 'tomcat'). Ignored if obj_hashes is provided. | |
| latest_sec | No | Get counter values for the latest N seconds. When provided, start_time/end_time are ignored. | |
| obj_hashes | No | Comma-separated object hashes for specific agents. Overrides obj_type. | |
| start_time | No | Start time. Defaults to 30 minutes ago. |