prometheus
Query and visualize Prometheus metrics from Kubernetes clusters using PromQL. Supports instant and time-series data, grouping by labels, and customized units for Recharts integration.
Instructions
Query Prometheus metrics from a specific cluster and format the results for Recharts visualization.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
cluster | No | The target cluster name. Defaults to the hub cluster. | |
data_type | No | Type of query: 'snapshot' for instant or 'range' for time-series. | snapshot |
end | No | (Only for data_type='range') End time in ISO 8601 format. Defaults to now if not provided. | |
group_by | No | Label to group results by, such as 'pod' or 'namespace'. | pod |
ql | Yes | The PromQL query string to run against the Prometheus server. | |
start | No | (Only for data_type='range') Start time in ISO 8601 format, e.g., '2025-06-06T00:00:00Z'. | |
step | No | (Only for data_type='range') Query resolution step (e.g., '30s', '5m', '1h'). | 5m |
unit | No | The desired output unit: 'auto', 'bytes', 'MiB', 'GiB', 'cores', or 'millicores'. | auto |
Input Schema (JSON Schema)
{
"properties": {
"cluster": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The target cluster name. Defaults to the hub cluster.",
"title": "Cluster"
},
"data_type": {
"default": "snapshot",
"description": "Type of query: 'snapshot' for instant or 'range' for time-series.",
"title": "Data Type",
"type": "string"
},
"end": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "(Only for data_type='range') End time in ISO 8601 format. Defaults to now if not provided.",
"title": "End"
},
"group_by": {
"default": "pod",
"description": "Label to group results by, such as 'pod' or 'namespace'.",
"title": "Group By",
"type": "string"
},
"ql": {
"description": "The PromQL query string to run against the Prometheus server.",
"title": "Ql",
"type": "string"
},
"start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "(Only for data_type='range') Start time in ISO 8601 format, e.g., '2025-06-06T00:00:00Z'.",
"title": "Start"
},
"step": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "5m",
"description": "(Only for data_type='range') Query resolution step (e.g., '30s', '5m', '1h').",
"title": "Step"
},
"unit": {
"default": "auto",
"description": "The desired output unit: 'auto', 'bytes', 'MiB', 'GiB', 'cores', or 'millicores'.",
"title": "Unit",
"type": "string"
}
},
"required": [
"ql"
],
"title": "prometheusArguments",
"type": "object"
}