@wayne.swaniawski
To get the exact used RAM percentage in Grafana, you can follow these steps:
The panel will now display the exact used RAM percentage based on the query and visualization settings you have configured in Grafana.
@wayne.swaniawski
If you prefer a more straightforward way to showcase the RAM usage percentage in Grafana without the intricacies of PromQL queries, you can follow these steps:
In your Grafana dashboard, click on the "Add panel" button to create a new panel. Select the data source (e.g., Prometheus) from the drop-down menu that collects RAM usage data. Now, go to the Metrics tab and search for the appropriate RAM metric (for example, 'node_memory_MemUsed_bytes' and 'node_memory_MemTotal_bytes'). Here you can create a new query that displays used RAM in bytes by subtracting the 'MemFree' from 'MemTotal,' or use the 'MemAvailable' and 'MemTotal' fields to calculate used RAM. Once you have configured the query, click on "Apply" or "Run" to see the RAM usage data in bytes. To convert this into a percentage, you can use a transformation plugin like the Math feature in the "Transform" tab of the panel editor and apply the appropriate calculations to get the percentage display. You can also add a separate gauge visualization panel to showcase the RAM usage percentage visually. Adjust the gauge settings to represent the value as desired. Save the changes to the panel and enjoy the accurate representation of the RAM usage percentage in your Grafana dashboard.