{"id":1834,"date":"2025-07-31T13:36:15","date_gmt":"2025-07-31T10:36:15","guid":{"rendered":"https:\/\/upcloud.com\/global\/us\/resources\/tutorials\/monitoring-upcloud-prometheus-part-3\/"},"modified":"2025-07-31T13:36:15","modified_gmt":"2025-07-31T10:36:15","slug":"monitoring-upcloud-prometheus-part-3","status":"publish","type":"tutorial","link":"https:\/\/upcloud.com\/global\/resources\/tutorials\/monitoring-upcloud-prometheus-part-3\/","title":{"rendered":"Monitoring on UpCloud with Prometheus: Part 3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the first two parts of this series, we walked through <a href=\"https:\/\/upcloud.com\/global\/resources\/tutorials\/monitoring-upcloud-prometheus-part-1\/\">setting up Prometheus on an UpCloud-managed Kubernetes cluster<\/a> and began <a href=\"https:\/\/upcloud.com\/global\/resources\/tutorials\/monitoring-upcloud-prometheus-part-2\/\">collecting metrics from both the cluster and external VMs<\/a> using Node Exporter. With Prometheus scraping metrics effectively, the next logical step is turning that raw data into meaningful visual insights. That\u2019s where Grafana comes in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/grafana.com\/\" target=\"_blank\" rel=\"noopener\">Grafana<\/a> is a powerful, open-source visualization tool purpose-built for time-series data like the metrics collected by Prometheus. It allows you to build real-time dashboards, set alerts, and gain visibility into your infrastructure without writing custom UI code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this third part, you\u2019ll learn how to integrate Grafana into your existing Prometheus setup on UpCloud. We\u2019ll walk through installing Grafana using Helm, connecting it to Prometheus, and exposing the Grafana UI so you can start exploring your data. You\u2019ll also learn how to import pre-built dashboards specifically designed for Node Exporter metrics, giving you instant insight into CPU usage, memory consumption, disk I\/O, and network traffic across your servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll also cover data retention settings and show you how to build your own dashboards using PromQL. By the end of this article, you\u2019ll have a fully functional monitoring and visualization stack ready to diagnose and optimize your infrastructure in real time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Grafana on the Monitoring Cluster<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Grafana can be deployed alongside Prometheus using the same Helm chart, kube-prometheus-stack, which bundles Prometheus, Grafana, Alertmanager, and related tooling into a single package. If you\u2019ve already installed this stack, Grafana may already be included by default. If not, you can enable it during installation or enable it later via a Helm upgrade.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s what you will need to follow along:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A working Kubernetes cluster on UpCloud with kube-prometheus-stack installed.<\/li>\n\n\n\n<li>Helm installed and configured to communicate with your cluster.<\/li>\n\n\n\n<li>kubectl access to the cluster.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Install or Upgrade kube-prometheus-stack With Grafana Enabled<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If installing fresh:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">helm repo add prometheus-community https:\/\/prometheus-community.github.io\/helm-charts\nhelm repo update\n\nhelm install prometheus-stack prometheus-community\/kube-prometheus-stack \\\n  --namespace monitoring \\\n  --create-namespace \\\n  --set grafana.enabled=true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If Grafana was previously disabled and you want to enable it now:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">helm upgrade prometheus-stack prometheus-community\/kube-prometheus-stack \\\n  --namespace monitoring \\\n  --set grafana.enabled=true<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Expose Grafana<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To access Grafana\u2019s web interface, you need to expose the service. UpCloud Managed Kubernetes provides excellent support for both LoadBalancer and Ingress methods:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Option A: LoadBalancer (Recommended for UpCloud)<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">UpCloud automatically provisions load balancers for LoadBalancer services, making this the simplest option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All you need to do is patch the Grafana service to use LoadBalancer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl patch svc prometheus-stack-grafana \\\n -n monitoring \\\n -p '{\"spec\": {\"type\": \"LoadBalancer\"}}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">UpCloud will automatically provision a load balancer and assign an external IP (typically takes 1-2 minutes). You can check the service status and get the external IP using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl get svc -n monitoring prometheus-stack-grafana\n\nNAME                       TYPE           CLUSTER-IP     EXTERNAL-IP                                           PORT(S)        AGE\nprometheus-stack-grafana   LoadBalancer   10.96.131.69   lb-0a49baafccad4bc0b3cd762a19727786-1.upcloudlb.com   80:31728\/TCP   3m42s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once available, access Grafana at <code>http:\/\/&lt;EXTERNAL-IP&gt;<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Note<\/em><\/strong><em>: UpCloud LoadBalancer services incur additional costs based on the <a href=\"https:\/\/upcloud.com\/global\/pricing\/#managed-load-balancer\">UpCloud Load Balancer pricing<\/a>.<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Option B: Ingress with UpCloud Load Balancer<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For production setups with custom domains, UpCloud supports NGINX Ingress Controller. However, you\u2019ll need to set up NGINX Ingress Controller (can be installed via UpCloud\u2019s add-ons or manually) and configure your custom domain name to point to your ingress controller\u2019s LoadBalancer IP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can deploy NGINX Ingress Controller using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">helm repo add ingress-nginx https:\/\/kubernetes.github.io\/ingress-nginx\nhelm install ingress-nginx ingress-nginx\/ingress-nginx \\\n --namespace ingress-nginx \\\n --create-namespace \\\n --set controller.service.type=LoadBalancer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can create a new ingress resource to set up routing so that the Grafana app is exposed on a subdomain of your choice, such as <code>grafana.yourdomain.com<\/code>. To do that, save the following in a file named <code>grafana-ingres.yaml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">apiVersion: networking.k8s.io\/v1\nkind: Ingress\nmetadata:\n name: grafana-ingress\n namespace: monitoring\n annotations:\n   nginx.ingress.kubernetes.io\/rewrite-target: \/\nspec:\n ingressClassName: nginx\n rules:\n - host: grafana.yourdomain.com\n   http:\n     paths:\n     - path: \/\n       pathType: Prefix\n       backend:\n         service:\n           name: prometheus-stack-grafana\n           port:\n             number: 80<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure to replace <code>grafana.yourdomain.com<\/code> with the right subdomain for your case. Once done, apply the ingress resource to your cluster:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl apply -f grafana-ingress.yaml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the ingress resource is deployed, you can check if it has received the external IP address by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl get ingress -n monitoring grafana-ingress\n\nNAME              CLASS    HOSTS   ADDRESS                                               PORTS   AGE\ngrafana-ingress   &lt;none&gt;   *       lb-0ab93ded31204f26b2e6d78985856604-1.upcloudlb.com   80      97s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once it receives an external IP, you will need to configure a CNAME record in your custom domain\u2019s DNS to point to the IP, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">name.domain.tld. IN CNAME 60 &lt;ingress-nginx-loadbalancer-external-ip&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you will be able to access Grafana at <code>https:\/\/grafana.yourdomain.com<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>For TLS<\/em><\/strong><em>: Use <code>cert-manager<\/code> with Let\u2019s Encrypt for automatic certificate management on UpCloud.<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Option C: Port Forwarding (Testing Only)<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For quick local testing without exposing the service, you can run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl port-forward svc\/prometheus-stack-grafana 3000:80 -n monitoring<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Access Grafana at <code>http:\/\/localhost:3000<\/code>. This method only works while the command is running.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connecting Prometheus as a Data Source<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once Grafana is up and running, the next step is to connect it to Prometheus so you can begin visualizing your metrics.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Log in to Grafana<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By default, you can access the Grafana UI at the external IP or domain configured in the previous step. To access it, navigate to <code>http:\/\/&lt;external-ip&gt;:3000<\/code> or your configured domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Log in using the default credentials:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">Username: admin\nPassword: prom-operator<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u26a0\ufe0f Tip: If you\u2019re using a different password (e.g., set via <code>values.yaml<\/code> or Helm), remember to use those credentials instead.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019re now in!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you navigate to <strong>Connection<\/strong> &gt; <strong>Data sources<\/strong> from the left pane, you will notice that Prometheus is already configured as a data source:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/2-prometheus-data-sources-1024x507.png\" alt=\"-\" class=\"wp-image-60217\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This means you can get started with building your dashboards right away!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Importing Pre-Built Dashboards for Node Exporter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Grafana\u2019s community offers a wide range of pre-built dashboards for popular exporters, including Node Exporter, which we configured in Part 2 to monitor UpCloud Servers. Rather than building a dashboard from scratch, let\u2019s start out by using one of the pre-made ones.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Navigate to the Dashboard Import Page<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Grafana UI, click the <strong>+<\/strong> icon on the right side of the top bar:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/3-prometheus-graffana-dashboard-1024x507.png\" alt=\"-\" class=\"wp-image-60219\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Select <strong>Import Dashboard<\/strong> from the dropdown menu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/4-prometheus-import-dashboard-1024x507.png\" alt=\"-\" class=\"wp-image-60220\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll be prompted to either upload a JSON file or enter a dashboard ID from Grafana\u2019s Dashboard Directory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/5-prometheus-dashboard-import-method-1024x507.png\" alt=\"-\" class=\"wp-image-60221\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Use Recommended Node Exporter Dashboards<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can import any of the following popular Node Exporter dashboards by entering the ID in the &#8220;Find and import dashboards for common applications at <a href=\"http:\/\/grafana.com\/dashboards\" target=\"_blank\" rel=\"noopener\">grafana.com\/dashboards<\/a>&#8221; field:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/grafana.com\/grafana\/dashboards\/1860-node-exporter-full\/\" target=\"_blank\" rel=\"noopener\">1860 Node Exporter Full<\/a>: A detailed, all-in-one dashboard covering CPU, memory, disk, network, system load, and more.<\/li>\n\n\n\n<li><a href=\"https:\/\/grafana.com\/grafana\/dashboards\/15172-node-exporter-for-prometheus-dashboard-based-on-11074\/\" target=\"_blank\" rel=\"noopener\">11074 Node Exporter Server Metrics<\/a>: A clean and minimal dashboard ideal for quick insights into system health.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After entering the dashboard ID, click Load. Grafana will then load the dashboard details and show them to you:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/6-prometheus-dashboard-import-details-1024x507.png\" alt=\"-\" class=\"wp-image-60224\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Select the Prometheus Data Source<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">On this import screen, choose your Prometheus data source from the dropdown. Optionally, rename the dashboard. Finally, click <strong>Import<\/strong> to complete the process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, you will view the loaded dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/7-prometheus-graffana-server-dashboard-1024x506.png\" alt=\"-\" class=\"wp-image-60225\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Explore Key Panels<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the dashboard loads, you\u2019ll see metrics visualized using real-time panels. Common panels include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CPU Usage<\/strong>: User, system, idle, and steal percentages over time.<\/li>\n\n\n\n<li><strong>Memory<\/strong>: Available vs. used memory, swap usage.<\/li>\n\n\n\n<li><strong>Filesystem<\/strong>: Usage per mounted disk, inode availability.<\/li>\n\n\n\n<li><strong>Network I\/O<\/strong>: Bytes in\/out, dropped packets, and errors per interface.<\/li>\n\n\n\n<li><strong>System Load<\/strong>: Load averages (1m, 5m, 15m) with alert thresholds.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These dashboards give you a powerful starting point for infrastructure monitoring without having to write PromQL yourself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring Data Retention and Storage Settings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, Prometheus stores time-series data locally on disk with a retention period of 15 days. This means older data is automatically deleted after that window, which can impact the range of historical data available in Grafana dashboards.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to analyze trends over a longer period, like 30, 60, or 90 days, you\u2019ll need to adjust Prometheus\u2019s storage settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Checking the Current Retention<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed Prometheus via kube-prometheus-stack, the retention period is likely managed via Helm values. You can confirm the current setting by reviewing the deployed config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">kubectl get pods -n monitoring\nkubectl describe pod &lt;prometheus-stack-pod-name&gt; -n monitoring<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the pod description, look for the &#8211;<code>-storage.tsdb.retention.time<\/code> flag in the container\u2019s args. Here\u2019s what it will look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">..\n      \/var\/run\/secrets\/kubernetes.io\/serviceaccount from kube-api-access-nzx55 (ro)\nContainers:\n  prometheus:\n    Container ID:  containerd:\/\/a64f57ec5b029edbf4388f0e31b7491be36ddd35aaa3f3cf96fde5afca9487dd\n    Image:         quay.io\/prometheus\/prometheus:v3.5.0\n    Image ID:      quay.io\/prometheus\/prometheus@sha256:63805ebb8d2b3920190daf1cb14a60871b16fd38bed42b857a3182bc621f4996\n    Port:          9090\/TCP\n    Host Port:     0\/TCP\n    Args:\n      --config.file=\/etc\/prometheus\/config_out\/prometheus.env.yaml\n      --web.enable-lifecycle\n      --web.external-url=http:\/\/prometheus-stack-kube-prom-prometheus.monitoring:9090\n      --web.route-prefix=\/\n      # Here's the value you're looking for \ud83d\udc47\n      --storage.tsdb.retention.time=10d\n      --storage.tsdb.path=\/prometheus\n      --storage.tsdb.wal-compression\n...<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Increasing Retention via Helm<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To change the retention period to something longer, such as 30 days, you can either update the <code>values.yaml<\/code> file or pass the flag directly when installing\/upgrading:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">helm upgrade prometheus-stack prometheus-community\/kube-prometheus-stack \\\n  --namespace monitoring \\\n  --set prometheus.prometheusSpec.retention=\"30d\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can set this to any duration (e.g., 45d, 60d, or 1y) depending on your disk capacity and monitoring needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Considering Disk Storage Requirements<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Setting a longer retention means more disk usage. A single monitored node might generate 150MB\u20131GB of data per day depending on scrape intervals. Therefore, you must ensure that your <code>PersistentVolumeClaims<\/code> (PVCs) for Prometheus have enough capacity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do that, you can configure storage in your values.yaml like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">prometheus:\n  prometheusSpec:\n    storageSpec:\n      volumeClaimTemplate:\n        spec:\n          resources:\n            requests:\n              storage: 50Gi<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>For truly long-term retention, Prometheus alone isn\u2019t enough. In Part 5 of this series, you\u2019ll learn about Thanos, which extends Prometheus with object storage support for durable, queryable metrics spanning months or years, without local disk constraints.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating Custom Dashboards<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While pre-built dashboards provide excellent starting points, custom dashboards let you tailor your monitoring to specific workloads, services, and business requirements. Grafana\u2019s dashboard builder supports powerful PromQL queries, diverse visualizations, and configurable alerting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Create a New Dashboard<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To create a new dashboard, click the <strong>+<\/strong> icon on the right side of the topbar in Grafana and click <strong>New dashboard<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/8-prometheus-graffana-create-new-dashboard-1024x506.png\" alt=\"-\" class=\"wp-image-60227\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will be taken to the new dashboard screen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/9-prometheus-graffana-configure-new-dashboard-1024x506.png\" alt=\"-\" class=\"wp-image-60228\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click the <strong>Add visualization<\/strong> to create your first panel. This opens the panel editor where you\u2019ll configure queries and visualizations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Configure Your Data Source and Query<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>Select data source<\/strong> modal, select your <strong>Prometheus<\/strong> data source from the dropdown:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/10-prometheus-graffana-select-data-source-1024x506.png\" alt=\"-\" class=\"wp-image-60229\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then, enter a PromQL expression in the query field. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]) * 100<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This shows CPU utilization as a percentage, excluding idle time, averaged over 5 minutes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Run query<\/strong> to preview the results and verify your data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s what it should look like when done:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/11-prometheus-graffana-new-dashboard-query-results-1024x506.png\" alt=\"-\" class=\"wp-image-60232\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can use the <strong>Query options<\/strong> to set refresh intervals or relative time ranges:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/12-prometheus-graffana-new-dashboard-query-options-1024x506.png\" alt=\"-\" class=\"wp-image-60235\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Pro tip<\/em><\/strong><em>: Consider using Grafana\u2019s query builder for complex queries, or explore metrics with the <\/em><strong><em>Metrics explorer<\/em><\/strong><em>.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Customize Your Visualization<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>Panel options<\/strong> section on the right, you can further customize how the panel will appear in the dashboard. For example, you can set the visualization type from one of many options, such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Time series<\/strong>: Line charts for metrics over time<\/li>\n\n\n\n<li><strong>Stat<\/strong>: Single value displays with sparklines<\/li>\n\n\n\n<li><strong>Gauge<\/strong>: Semi-circular progress indicators<\/li>\n\n\n\n<li><strong>Bar chart<\/strong>: Compare values across categories<\/li>\n\n\n\n<li><strong>Heatmap<\/strong>: Show data density and patterns<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>Panel Options<\/strong>, you can set the following details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Panel title<\/strong>: Give your panel a descriptive name<\/li>\n\n\n\n<li><strong>Description<\/strong>: Add context for other team members<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, based on your visualization type, you can customize other details such as legends, axes, graph styles, etc.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Save and Organize Your Dashboard<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019re happy with how your panel looks, click <strong>Save dashboard<\/strong> to add the panel to your dashboard and save it. You might be asked to provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Dashboard name<\/li>\n\n\n\n<li>Folder location<\/li>\n\n\n\n<li>Description and tags for organization<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can now continue building your dashboard as you like! Custom dashboards enable you to move beyond basic infrastructure monitoring to track application-specific KPIs, SLA metrics, business logic, and user experience, all unified through Prometheus data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With Grafana integrated into your monitoring stack, you\u2019re no longer just collecting raw Prometheus metrics; you\u2019re now also transforming them into rich, actionable visualizations. Whether you\u2019re tracking CPU usage across UpCloud cloud servers, monitoring memory spikes in Kubernetes nodes, or customizing dashboards for your own applications, Grafana provides the observability layer that brings everything together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By importing pre-built dashboards like <a href=\"https:\/\/grafana.com\/grafana\/dashboards\/1860-node-exporter-full\/\" target=\"_blank\" rel=\"noopener\">Node Exporter Full<\/a> or designing your own panels with PromQL, you gain real-time insight into system performance and resource trends. And with retention settings tuned appropriately, you can scale your monitoring window as you like, giving you a much clearer picture of how your infrastructure evolves over time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the next part of this series, we\u2019ll take things further by instrumenting custom applications to expose Prometheus-compatible metrics. You\u2019ll learn how to track app-level performance indicators, set up metrics endpoints, and visualize them side-by-side with your infrastructure metrics in Grafana.<\/p>\n","protected":false},"author":82,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","community-category":[223,238],"class_list":["post-1834","tutorial","type-tutorial","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/comments?post=1834"}],"version-history":[{"count":0,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1834\/revisions"}],"wp:attachment":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/media?parent=1834"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/community-category?post=1834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}