-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
Using an existing JFR file uploaded to Cryostat, it should be possible to verify the data presented by Grafana for that recording. It should be possible to use the Grafana API to give us repeatable JSON data for the datasource and dashboards.
We can start by querying the dashboard API for information about what information/panels will be displayed:
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/#get-dashboard-by-uid
Then we can parse that and construct datasource queries, similar to those Grafana would use itself to populate the dashboard:
POST /api/datasources/proxy/1/query
{
"requestId": "Q106",
"range": {
"from": "2024-04-08T20:23:35.127Z",
"to": "2024-04-09T20:23:35.127Z",
"raw": {
"from": "now-24h",
"to": "now"
}
},
"interval": "15m",
"intervalMs": 900000,
"targets": [
{
"target": "jdk.PhysicalMemory.usedSize",
"refId": "A",
"type": "timeserie"
}
],
"maxDataPoints": 100,
"startTime": 1712694215127
}
Example response:
[
{
"target": "jdk.PhysicalMemory.usedSize",
"datapoints": [
[
120377344,
1712692998158
],
[
1.1884544E+8,
1712693027960
]
],
"meta": {}
}
]
tthvo
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog
Status
Backlog