Query server metrics over time range
Executes a Prometheus range query to retrieve server metrics over a specified time period. This endpoint allows you to analyze performance trends, generate custom charts, and investigate performance issues by querying specific metrics with custom time ranges. The endpoint acts as a proxy to the server's Prometheus instance, enabling powerful time-series data analysis.
For detailed information about query syntax, functions, and operators, refer to the Prometheus Query API documentation.
Key Parameters:
- id: The unique identifier of the server
- query: Prometheus query string (e.g., 'node_memory_MemFree_bytes', 'rate(node_network_receive_bytes_total[5m])')
- start: Unix timestamp for the start of the query range
- end: Unix timestamp for the end of the query range
- step: Resolution step for the data points (e.g., '15s', '1m', '1h')
NOTE: This endpoint requires the server to have the Prometheus capability enabled. Complex queries may take longer to execute, and very large time ranges with small steps may be limited for performance reasons.
Request
- Base URL: https://api.cloudpepper.io
- URL: https://api.cloudpepper.io/servers/{id}/prometheus
- Auth: HTTP bearer
Response
Query executed successfully
Example response
{
"status": "success",
"data": {
"resultType": "matrix"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.