cryostat-legacy
cryostat-legacy copied to clipboard
Rules Report should allow linking to pertinent Grafana visualizations
The HTML Reports should be modified such that rule result descriptions contain links to Grafana views - if a Grafana dashboard and datasource are configured - so that the end user can quickly and easily jump from the container-jfr overview into a more detailed analysis from the automated report, without resorting to downloading the flight recording and analysing the recording using traditional desktop JMC.
I have a WIP branch for adding Grafana links to reports.
It only displays the link if one is configured. However, can you clarify the definition of being "accessible"? Should it just simply check if there is a web service available at the configured URL, or there are more verifications need to be done?
Simply checking that the environment variable is set is probably good enough, at least for now. I'm not sure it would necessarily be worth trying to perform some pre-verification that the configured Grafana instance is accessible, as opposed to simply allowing operations to fail (ex. injected links are broken, or recording uploads respond with errors).
The linking desired in this issue is more of a deep-linking than simply to the main page of the dashboard, so I should edit the issue title/description to be more accurate. We don't currently have a URL scheme for this, but the idea is that certain rules (unclear exactly which at this point) would gain links to views within Grafana with visualizations of data pertaining to those rule reports. For simply visiting the Grafana dashboard itself, this is already easily achieved when a user clicks the "View in Grafana" button in the expanded recording item - after a successful upload of the recording to the jfr-datasource, the web client attempts to open the dashboard URL in a new tab.
Sorry for misinterpreting the requirements. If I understand correctly, the first step is to find the correspondences between rules (defined in flightrecorder.rules.jdk
module) and individual panels (defined in jfr-datasource/dashboards/dashboard.json
). Is there existing progress on this? If not, I'm glad to start looking into this topic.
Jie and I have talked about that very briefly, but we're still not completely sure what it should look like. Some of the rules probably do correspond very well with existing dashboard panels, but there are others that do not and will require some UI planning to even figure out what the visualization should look like before we can get to linking to the visualization. Then we need to do some more UI planning to figure out how we want to organize these different visualizations into distinct views that can reflect each of the rules, and then we will worry about how to produce generated links from rules to those views.
Okay I understand now. I'll stop working on this topic at this time until it's more clear. Thanks for sharing this information.