{"id":15397,"date":"2023-02-08T23:50:38","date_gmt":"2023-02-08T20:50:38","guid":{"rendered":"https:\/\/kifarunix.com\/?p=15397"},"modified":"2024-06-17T20:00:27","modified_gmt":"2024-06-17T17:00:27","slug":"monitor-docker-containers-metrics-using-grafana","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/monitor-docker-containers-metrics-using-grafana\/","title":{"rendered":"Monitor Docker Containers Metrics using Grafana"},"content":{"rendered":"\n<p>How do I monitor Docker containers in Grafana? Well, in this tutorial, you will learn how to monitor Docker containers metrics using Grafana. Grafana is an open source analytics and interactive data visualization tool that can be used to visualize metrics, logs collected from various remote endpoints. In this specific scenario, we will focus on monitoring Docker containers metrics using <a href=\"https:\/\/github.com\/grafana\/grafana#readme\" target=\"_blank\" rel=\"noreferrer noopener\">Grafana<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#monitoring-docker-containers-metrics-using-grafana\">Monitoring Docker Containers Metrics using Grafana<\/a><ul><li><a href=\"#create-docker-network-to-interconnect-c-advisor-prometheus-and-grafana\">Create Docker Network to Interconnect cAdvisor, Prometheus and Grafana<\/a><\/li><li><a href=\"#deploy-c-advisor-docker-container\">Deploy cAdvisor Docker Container<\/a><\/li><li><a href=\"#view-container-runtime-metrics-on-c-advisor-dashboard\">View Container Runtime Metrics on cAdvisor Dashboard<\/a><\/li><li><a href=\"#deploy-prometheus-docker-container\">Deploy Prometheus Docker Container<\/a><\/li><li><a href=\"#verify-prometheus-targets-metrics-from-prometheus-dashboard\">Verify Prometheus Targets\/Metrics from Prometheus Dashboard<\/a><\/li><li><a href=\"#check-docker-container-metrics-on-prometheus\">Check Docker Container Metrics on Prometheus<\/a><\/li><li><a href=\"#deploy-grafana-docker-container\">Deploy Grafana Docker Container<\/a><\/li><li><a href=\"#accessing-grafana-web-interface\">Accessing Grafana Web Interface<\/a><\/li><li><a href=\"#integrate-prometheus-with-grafana-for-monitoring\">Integrate Prometheus with Grafana For Monitoring<\/a><\/li><li><a href=\"#create-docker-metrics-dashboards-on-grafana\">Create Docker Metrics Dashboards on Grafana<\/a><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"monitoring-docker-containers-metrics-using-grafana\">Monitoring Docker Containers Metrics using Grafana<\/h2>\n\n\n\n<p>In this guide, we will use Grafana, Prometheus and cAdvisor (Container Advisor) to monitor Docker containers metrics. So basically, cAdvisor analyzes and exposes running containers metrics. Such metrics are then scraped using Prometheus time series database. Grafana will then be configured to read the metrics from Prometheus itself for visualization.<\/p>\n\n\n\n<p>In short, these are the tools we will use in this guide to show you how to monitor Docker containers metrics;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#cadvisor-container\">cAdvisor<\/a><\/li>\n\n\n\n<li><a href=\"#prometheus-container\">Prometheus<\/a><\/li>\n\n\n\n<li><a href=\"#grafana-docker-container\">Grafana<\/a><\/li>\n<\/ul>\n\n\n\n<p>Since we are collecting and monitoring Docker containers metrics, we will deploy all the above tools as Docker containers!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-docker-network-to-interconnect-c-advisor-prometheus-and-grafana\">Create Docker Network to Interconnect cAdvisor, Prometheus and Grafana<\/h3>\n\n\n\n<p>To ensure that these monitoring containers, Grafana, cAdvisor, and Prometheus can communicate with each other, you need to put them on the same Docker network;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker network create monitoring_stack<\/code><\/pre>\n\n\n\n<p>The above command creates a Docker network called <strong><code>monitoring_stack<\/code><\/strong>.<\/p>\n\n\n\n<p>You check available Docker networks using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker network ls<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>NETWORK ID     NAME                         DRIVER    SCOPE\n5f44af648fc1   bridge                       bridge    local\n26035daefa88   docker_gwbridge              bridge    local\n948a8c9971f6   host                         host      local\n<strong>74d82d574037   monitoring_stack             bridge    local<\/strong>\n326f211f2226   nagios-core-docker_default   bridge    local\ne8a7ddcc85b4   none                         null      local\nce199041829e   wp-app                       bridge    local\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deploy-c-advisor-docker-container\">Deploy cAdvisor Docker Container<\/h3>\n\n\n\n<p>To begin with, let&#8217;s deploy cAdvisor so it can collect Docker container runtime metrics. You can simply run the command below to deploy cAdvisor and attach it to our custom Docker network above;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>docker run -d -p 9080:8080 \\\n  --network monitoring_stack \\\n  -v=\/:\/rootfs:ro \\\n  -v=\/var\/run:\/var\/run:ro \\\n  -v=\/sys:\/sys:ro \\\n  -v=\/var\/lib\/docker\/:\/var\/lib\/docker:ro \\\n  -v=\/dev\/disk\/:\/dev\/disk:ro \\\n  --privileged \\\n  --device=\/dev\/kmsg \\\n  --name=cadvisor \\\n  gcr.io\/cadvisor\/cadvisor\n<\/code><\/pre>\n\n\n\n<p>By default, cAdvisor exposes metrics on port 8080. We have bound this port to host port 9080.<\/p>\n\n\n\n<p>cAdvisor container should now be up and running;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker ps -a<\/code><\/pre>\n\n\n\n<pre class=\"scroll-sz\"><code>CONTAINER ID   IMAGE                      COMMAND                  CREATED         STATUS                   PORTS                                       NAMES\ncd7c80dc0ac1   gcr.io\/cadvisor\/cadvisor   \"\/usr\/bin\/cadvisor -\u2026\"   2 minutes ago   Up 2 minutes (healthy)   0.0.0.0:9080-&gt;8080\/tcp, :::9080-&gt;8080\/tcp   cadvisor\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"view-container-runtime-metrics-on-c-advisor-dashboard\">View Container Runtime Metrics on cAdvisor Dashboard<\/h3>\n\n\n\n<p>You can now access cAdvisor dashboard via <strong><code>http:\/\/&lt;docker-host-IP&gt;:8080\/docker<\/code><\/strong>.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cAdvisor-Docker-Containers-metrics.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1402\" height=\"1804\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cAdvisor-Docker-Containers-metrics.png\" alt=\"Monitor Docker Containers Metrics using Grafana\" class=\"wp-image-15432\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cAdvisor-Docker-Containers-metrics.png?v=1675833612 1402w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cAdvisor-Docker-Containers-metrics-768x988.png?v=1675833612 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cAdvisor-Docker-Containers-metrics-1194x1536.png?v=1675833612 1194w\" sizes=\"(max-width: 1402px) 100vw, 1402px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Check each container metrics by clicking on each container from cAdvisor dashboard. sample metrics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1383\" height=\"3745\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cadvisor-docker-containers-metrics-1.png\" alt=\"\" class=\"wp-image-15434\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cadvisor-docker-containers-metrics-1.png?v=1675833975 1383w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cadvisor-docker-containers-metrics-1-768x2080.png?v=1675833975 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cadvisor-docker-containers-metrics-1-567x1536.png?v=1675833975 567w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/cadvisor-docker-containers-metrics-1-756x2048.png?v=1675833975 756w\" sizes=\"(max-width: 1383px) 100vw, 1383px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deploy-prometheus-docker-container\">Deploy Prometheus Docker Container<\/h3>\n\n\n\n<p>Next, deploy Prometheus Docker container to scrape collected container data from cAdvisor and store them in its internal time series database which can later be read and visualized via Grafana.<\/p>\n\n\n\n<p>First of all, before you can deploy Prometheus Docker container, create a Prometheus configuration file. In our setup, we placed the Prometheus configuration file under <code><strong>\/opt\/prometheus<\/strong><\/code> directory. While creating Prometheus Docker container, we will mount this configuration file to the default Prometheus configuration file, <strong><code>\/etc\/prometheus\/prometheus.yml<\/code><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/opt\/prometheus\/prometheus.yml<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n# my global config\nglobal:\n  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.\n  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.\n  # scrape_timeout is set to the global default (10s).\n# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.\nrule_files:\n  # - \"first.rules\"\n  # - \"second.rules\"\n# A scrape configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus itself.\n<strong>scrape_configs:\n  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.\n  - job_name: 'prometheus'\n    static_configs:\n      - targets: ['localhost:9090']\n  - job_name: 'cadvisor'\n    static_configs:\n      - targets: ['cadvisor:8080']<\/strong>\n<\/code><\/pre>\n\n\n\n<p>In the configuration above, we use default settings for Prometheus and configured it to scrape the Docker metrics collected by cAdvisor <strong><code>cadvisor:8080<\/code><\/strong>.<\/p>\n\n\n\n<p>We use the name of the cAdvisor container since both Prometheus and cAdvisor are on same network and they should be able to communicate via their &#8220;names&#8221;.<\/p>\n\n\n\n<p>Prometheus will publish the metrics it scrapes on port 9090.<\/p>\n\n\n\n<p>Thus, let&#8217;s create Prometheus Docker container using the official Prometheus Docker image and configure it to use our custom network created above, <code>monitoring_stack<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d -p 9090:9090 \\\n--network monitoring_stack \\\n-v \"\/opt\/prometheus\/prometheus.yml:\/etc\/prometheus\/prometheus.yml\" \\\n--restart unless-stopped \\\n--name prometheus \\\n prom\/prometheus<\/code><\/pre>\n\n\n\n<p>Your Prometheus container should now be running and exposed via port 9090\/tcp.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker ps --format '{{.Names}} {{.Ports}} {{.Status}}'<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>prometheus 0.0.0.0:9090-&gt;9090\/tcp, :::9090-&gt;9090\/tcp Up 8 minutes<\/code><\/pre>\n\n\n\n<p>Similarly, ensure you allow port 9090\/tcp on firewall.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"verify-prometheus-targets-metrics-from-prometheus-dashboard\">Verify Prometheus Targets\/Metrics from Prometheus Dashboard<\/h3>\n\n\n\n<p>You can now navigate to <strong><code>http:\/\/docker-host-IP:9090\/targets<\/code><\/strong> to see Prometheus targets,<\/p>\n\n\n\n<p>Targets;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/docker-container-prometheus_targets.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1900\" height=\"586\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/docker-container-prometheus_targets.png\" alt=\"Monitor Docker Containers Metrics using Grafana\" class=\"wp-image-15435\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/docker-container-prometheus_targets.png?v=1675834907 1900w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/docker-container-prometheus_targets-768x237.png?v=1675834907 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/docker-container-prometheus_targets-1536x474.png?v=1675834907 1536w\" sizes=\"(max-width: 1900px) 100vw, 1900px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>To see cAdvisor collected metrics, just simply go to <strong><code>http:\/\/docker-host-IP:9080\/metrics<\/code><\/strong>;<\/p>\n\n\n\n<p>Or even better;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -s http:\/\/docker-host-IP:9080\/metrics<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-docker-container-metrics-on-prometheus\">Check Docker Container Metrics on Prometheus<\/h3>\n\n\n\n<p>Before you can integrate Grafana with Prometheus, you can also be able to check Docker container metrics from Prometheus dashboard e.g;<\/p>\n\n\n\n<p>Just type <strong>container<\/strong> and you should see quite a number of metrics;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1900\" height=\"655\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/prometheus-docker-container-metrics.png\" alt=\"\" class=\"wp-image-15437\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/prometheus-docker-container-metrics.png?v=1675838696 1900w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/prometheus-docker-container-metrics-768x265.png?v=1675838696 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/prometheus-docker-container-metrics-1536x530.png?v=1675838696 1536w\" sizes=\"(max-width: 1900px) 100vw, 1900px\" \/><\/figure>\n\n\n\n<p>You can filter running containers using the query;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>container_tasks_state{name=~\".+.\",state=\"running\"}<\/code><\/pre>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-prometheus-queries.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1891\" height=\"843\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-prometheus-queries.png\" alt=\"\" class=\"wp-image-15442\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-prometheus-queries.png?v=1675845842 1891w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-prometheus-queries-768x342.png?v=1675845842 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-prometheus-queries-1536x685.png?v=1675845842 1536w\" sizes=\"(max-width: 1891px) 100vw, 1891px\" \/><\/figure><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deploy-grafana-docker-container\">Deploy Grafana Docker Container<\/h3>\n\n\n\n<p>To get a better visualization of the Docker container metrics, you can deploy Grafana Docker container and configure it read and give a visualization of the Docker container metrics scrapped by Prometheus.<\/p>\n\n\n\n<p>To deploy Grafana Docker container using the official image, <strong><code>grafana\/grafana-oss<\/code><\/strong> and attach it to the custom network created above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d -p 3000:3000 \\\n--network monitoring_stack \\\n--restart unless-stopped \\\n--name grafana \\\ngrafana\/grafana-oss<\/code><\/pre>\n\n\n\n<p>Open port 3000\/tcp on firewall to allow external access to Grafana;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 3000\/tcp<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-grafana-web-interface\">Accessing Grafana Web Interface<\/h3>\n\n\n\n<p>You can now access Grafana web interface http:\/\/docker-host-IP:3000.<\/p>\n\n\n\n<p>Default credentials are <strong>admin\/admin<\/strong>. Reset the password and proceed to the Dashboard;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1888\" height=\"919\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard.png\" alt=\"Monitor Docker Containers Metrics using Grafana\" class=\"wp-image-15421\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard.png?v=1675716247 1888w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-768x374.png?v=1675716247 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-1536x748.png?v=1675716247 1536w\" sizes=\"(max-width: 1888px) 100vw, 1888px\" \/><\/figure><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"integrate-prometheus-with-grafana-for-monitoring\">Integrate Prometheus with Grafana For Monitoring<\/h3>\n\n\n\n<p>You can now integrate Prometheus with Grafana by adding Prometheus data source to Grafana. Check the link below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/integrate-prometheus-with-grafana-for-monitoring\/#add-grafana-prometheus-data-source\" target=\"_blank\" rel=\"noreferrer noopener\">Integrate Prometheus with Grafana For Monitoring<\/a><\/p>\n\n\n\n<p>Data sources, once you have added the Prometheus data source.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-prometheus-docker-container-data-source.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1889\" height=\"457\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-prometheus-docker-container-data-source.png\" alt=\"Monitor Docker Containers Metrics using Grafana\" class=\"wp-image-15429\" title=\"Monitor SSL\/TLS Certificate Expiry with Prometheus and Grafana 4\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-prometheus-docker-container-data-source.png?v=1675785437 1889w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-prometheus-docker-container-data-source-768x186.png?v=1675785437 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-prometheus-docker-container-data-source-1536x372.png?v=1675785437 1536w\" sizes=\"(max-width: 1889px) 100vw, 1889px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>As you can see, we specified the name of the Prometheus container on the data source URL because both Grafana and Prometheus are on same network.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-docker-metrics-dashboards-on-grafana\">Create Docker Metrics Dashboards on Grafana<\/h3>\n\n\n\n<p>You can now create your own Grafana visualization dashboards.<\/p>\n\n\n\n<p>As a simple example, let&#8217;s create a simple visualization to display running, paused or stopped containers;<\/p>\n\n\n\n<p>To create a Grafana dashboard, navigate to dashboards menu &gt; New dashboard.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-menu.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1665\" height=\"571\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-menu.png\" alt=\"\" class=\"wp-image-15430\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-menu.png?v=1675786297 1665w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-menu-768x263.png?v=1675786297 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-dashboard-menu-1536x527.png?v=1675786297 1536w\" sizes=\"(max-width: 1665px) 100vw, 1665px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Add new panel;<\/p>\n\n\n\n<p>You have three sections on the dashboard panel;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/new-dashboard-panel.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1895\" height=\"942\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/new-dashboard-panel.png\" alt=\"\" class=\"wp-image-15443\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/new-dashboard-panel.png?v=1675848390 1895w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/new-dashboard-panel-768x382.png?v=1675848390 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/new-dashboard-panel-1536x764.png?v=1675848390 1536w\" sizes=\"(max-width: 1895px) 100vw, 1895px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>So, to create a visualization of specific metric, you need a query to fetch those metrics from the datasource, which in this case is our Preom<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>So from the Query panel, select a datasource (Prometheus in this example).<\/li>\n\n\n\n<li>You can build your query using Builder which lets you select metrics and enter values (<strong>Builder<\/strong>) or simply switch to <strong>code<\/strong> which allows you to type the query manually.\n<ul class=\"wp-block-list\">\n<li>with Builder, you can simply select your metric query from <strong>Metric<\/strong> dropdown and define the filters under <strong>Label filters<\/strong>.<\/li>\n\n\n\n<li>with Code, you can just type your query under metrics browser;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Builder;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-builder-1.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1476\" height=\"440\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-builder-1.png\" alt=\"Monitor Docker Containers Metrics using Grafana\" class=\"wp-image-15465\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-builder-1.png?v=1675877097 1476w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-builder-1-768x229.png?v=1675877097 768w\" sizes=\"(max-width: 1476px) 100vw, 1476px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Code:<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-code-2.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1485\" height=\"374\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-code-2.png\" alt=\"\" class=\"wp-image-15466\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-code-2.png?v=1675877186 1485w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/grafana-query-code-2-768x193.png?v=1675877186 768w\" sizes=\"(max-width: 1485px) 100vw, 1485px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>The query will count total number of running containers seen in last one minute (names is not empty), <strong><code>count(rate(container_last_seen{name!=\"\"}[1m]))<\/code><\/strong>.<\/p>\n\n\n\n<p>Under the Panel options;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>change visualization type. We are using Stat in this example<\/li>\n\n\n\n<li>Set the panel name e.g Running Containers. You can leave other options with default values<\/li>\n\n\n\n<li>Value options: we leave defaults<\/li>\n\n\n\n<li>Stat Styles, we only changed <strong>Color mode<\/strong> to <strong>Value<\/strong> and <strong>Graph Mode<\/strong> to <strong>node<\/strong>.<\/li>\n\n\n\n<li>Standard Options unit <strong>Number<\/strong>.<\/li>\n\n\n\n<li>everything else, defaults!<\/li>\n<\/ul>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/running-containers-stats-1.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1885\" height=\"904\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/running-containers-stats-1.png\" alt=\"\" class=\"wp-image-15467\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/running-containers-stats-1.png?v=1675877378 1885w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/running-containers-stats-1-768x368.png?v=1675877378 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/running-containers-stats-1-1536x737.png?v=1675877378 1536w\" sizes=\"(max-width: 1885px) 100vw, 1885px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>When done, click <strong>Save\/Apply<\/strong> to save the dashboard\/visualization.<\/p>\n\n\n\n<p>Docker container total CPU usage, RAM usage, Network I\/O, Block I\/O<\/p>\n\n\n\n<p>Sample dashboard;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1891\" height=\"938\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-container-metrics-grafana-dashboards.png\" alt=\"\" class=\"wp-image-15468\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-container-metrics-grafana-dashboards.png?v=1675888515 1891w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-container-metrics-grafana-dashboards-768x381.png?v=1675888515 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/02\/sample-container-metrics-grafana-dashboards-1536x762.png?v=1675888515 1536w\" sizes=\"(max-width: 1891px) 100vw, 1891px\" \/><\/figure>\n\n\n\n<p>Here is a sample dashboard JSON file;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\n{\n  \"annotations\": {\n    \"list\": [\n      {\n        \"builtIn\": 1,\n        \"datasource\": {\n          \"type\": \"grafana\",\n          \"uid\": \"-- Grafana --\"\n        },\n        \"enable\": true,\n        \"hide\": true,\n        \"iconColor\": \"rgba(0, 211, 255, 1)\",\n        \"name\": \"Annotations & Alerts\",\n        \"target\": {\n          \"limit\": 100,\n          \"matchAny\": false,\n          \"tags\": [],\n          \"type\": \"dashboard\"\n        },\n        \"type\": \"dashboard\"\n      }\n    ]\n  },\n  \"editable\": true,\n  \"fiscalYearStartMonth\": 0,\n  \"graphTooltip\": 0,\n  \"id\": 7,\n  \"links\": [],\n  \"liveNow\": false,\n  \"panels\": [\n    {\n      \"gridPos\": {\n        \"h\": 1,\n        \"w\": 24,\n        \"x\": 0,\n        \"y\": 0\n      },\n      \"id\": 10,\n      \"title\": \"Row title\",\n      \"type\": \"row\"\n    },\n    {\n      \"datasource\": {\n        \"type\": \"prometheus\",\n        \"uid\": \"iLkJX_A4z\"\n      },\n      \"fieldConfig\": {\n        \"defaults\": {\n          \"color\": {\n            \"mode\": \"thresholds\"\n          },\n          \"mappings\": [],\n          \"thresholds\": {\n            \"mode\": \"absolute\",\n            \"steps\": [\n              {\n                \"color\": \"green\",\n                \"value\": null\n              },\n              {\n                \"color\": \"red\",\n                \"value\": 80\n              }\n            ]\n          },\n          \"unit\": \"none\"\n        },\n        \"overrides\": []\n      },\n      \"gridPos\": {\n        \"h\": 8,\n        \"w\": 9,\n        \"x\": 0,\n        \"y\": 1\n      },\n      \"id\": 2,\n      \"options\": {\n        \"colorMode\": \"value\",\n        \"graphMode\": \"none\",\n        \"justifyMode\": \"auto\",\n        \"orientation\": \"auto\",\n        \"reduceOptions\": {\n          \"calcs\": [\n            \"lastNotNull\"\n          ],\n          \"fields\": \"\",\n          \"values\": false\n        },\n        \"textMode\": \"auto\"\n      },\n      \"pluginVersion\": \"9.3.6\",\n      \"targets\": [\n        {\n          \"datasource\": {\n            \"type\": \"prometheus\",\n            \"uid\": \"iLkJX_A4z\"\n          },\n          \"editorMode\": \"code\",\n          \"expr\": \"count(rate(container_last_seen{name!=\\\"\\\"}[1m]))\",\n          \"legendFormat\": \"__auto\",\n          \"range\": true,\n          \"refId\": \"A\"\n        }\n      ],\n      \"title\": \"Running Containers\",\n      \"type\": \"stat\"\n    },\n    {\n      \"datasource\": {\n        \"type\": \"prometheus\",\n        \"uid\": \"iLkJX_A4z\"\n      },\n      \"fieldConfig\": {\n        \"defaults\": {\n          \"color\": {\n            \"mode\": \"palette-classic\"\n          },\n          \"custom\": {\n            \"axisCenteredZero\": false,\n            \"axisColorMode\": \"text\",\n            \"axisLabel\": \"\",\n            \"axisPlacement\": \"left\",\n            \"barAlignment\": 0,\n            \"drawStyle\": \"line\",\n            \"fillOpacity\": 10,\n            \"gradientMode\": \"none\",\n            \"hideFrom\": {\n              \"legend\": false,\n              \"tooltip\": false,\n              \"viz\": false\n            },\n            \"lineInterpolation\": \"linear\",\n            \"lineWidth\": 2,\n            \"pointSize\": 5,\n            \"scaleDistribution\": {\n              \"type\": \"linear\"\n            },\n            \"showPoints\": \"never\",\n            \"spanNulls\": true,\n            \"stacking\": {\n              \"group\": \"A\",\n              \"mode\": \"none\"\n            },\n            \"thresholdsStyle\": {\n              \"mode\": \"off\"\n            }\n          },\n          \"mappings\": [],\n          \"thresholds\": {\n            \"mode\": \"absolute\",\n            \"steps\": [\n              {\n                \"color\": \"green\",\n                \"value\": null\n              },\n              {\n                \"color\": \"red\",\n                \"value\": 80\n              }\n            ]\n          }\n        },\n        \"overrides\": []\n      },\n      \"gridPos\": {\n        \"h\": 8,\n        \"w\": 15,\n        \"x\": 9,\n        \"y\": 1\n      },\n      \"id\": 4,\n      \"options\": {\n        \"legend\": {\n          \"calcs\": [\n            \"max\",\n            \"min\",\n            \"mean\"\n          ],\n          \"displayMode\": \"table\",\n          \"placement\": \"right\",\n          \"showLegend\": true\n        },\n        \"tooltip\": {\n          \"mode\": \"single\",\n          \"sort\": \"none\"\n        }\n      },\n      \"targets\": [\n        {\n          \"datasource\": {\n            \"type\": \"prometheus\",\n            \"uid\": \"iLkJX_A4z\"\n          },\n          \"editorMode\": \"code\",\n          \"expr\": \"rate(container_cpu_usage_seconds_total{name=~\\\".+\\\"}[5m]) * 100\",\n          \"legendFormat\": \"{{name}}\",\n          \"range\": true,\n          \"refId\": \"A\"\n        }\n      ],\n      \"title\": \"% CPU Usage\",\n      \"type\": \"timeseries\"\n    },\n    {\n      \"datasource\": {\n        \"type\": \"prometheus\",\n        \"uid\": \"iLkJX_A4z\"\n      },\n      \"fieldConfig\": {\n        \"defaults\": {\n          \"color\": {\n            \"mode\": \"palette-classic\"\n          },\n          \"custom\": {\n            \"axisCenteredZero\": false,\n            \"axisColorMode\": \"text\",\n            \"axisLabel\": \"\",\n            \"axisPlacement\": \"auto\",\n            \"barAlignment\": 0,\n            \"drawStyle\": \"line\",\n            \"fillOpacity\": 0,\n            \"gradientMode\": \"none\",\n            \"hideFrom\": {\n              \"legend\": false,\n              \"tooltip\": false,\n              \"viz\": false\n            },\n            \"lineInterpolation\": \"linear\",\n            \"lineWidth\": 1,\n            \"pointSize\": 5,\n            \"scaleDistribution\": {\n              \"type\": \"linear\"\n            },\n            \"showPoints\": \"auto\",\n            \"spanNulls\": false,\n            \"stacking\": {\n              \"group\": \"A\",\n              \"mode\": \"none\"\n            },\n            \"thresholdsStyle\": {\n              \"mode\": \"off\"\n            }\n          },\n          \"mappings\": [],\n          \"thresholds\": {\n            \"mode\": \"absolute\",\n            \"steps\": [\n              {\n                \"color\": \"green\",\n                \"value\": null\n              },\n              {\n                \"color\": \"red\",\n                \"value\": 80\n              }\n            ]\n          },\n          \"unit\": \"KBs\"\n        },\n        \"overrides\": []\n      },\n      \"gridPos\": {\n        \"h\": 8,\n        \"w\": 9,\n        \"x\": 0,\n        \"y\": 9\n      },\n      \"id\": 8,\n      \"options\": {\n        \"legend\": {\n          \"calcs\": [\n            \"mean\"\n          ],\n          \"displayMode\": \"table\",\n          \"placement\": \"right\",\n          \"showLegend\": true,\n          \"sortBy\": \"Mean\",\n          \"sortDesc\": true\n        },\n        \"tooltip\": {\n          \"mode\": \"single\",\n          \"sort\": \"none\"\n        }\n      },\n      \"targets\": [\n        {\n          \"datasource\": {\n            \"type\": \"prometheus\",\n            \"uid\": \"iLkJX_A4z\"\n          },\n          \"editorMode\": \"code\",\n          \"expr\": \"sum(rate(container_network_transmit_bytes_total{name=~\\\".+\\\"}[5m])) by (name)\",\n          \"legendFormat\": \"{{name}}\",\n          \"range\": true,\n          \"refId\": \"A\"\n        }\n      ],\n      \"title\": \"Transmitted Network Traffic (Tx)\",\n      \"type\": \"timeseries\"\n    },\n    {\n      \"datasource\": {\n        \"type\": \"prometheus\",\n        \"uid\": \"iLkJX_A4z\"\n      },\n      \"fieldConfig\": {\n        \"defaults\": {\n          \"color\": {\n            \"mode\": \"palette-classic\"\n          },\n          \"custom\": {\n            \"axisCenteredZero\": false,\n            \"axisColorMode\": \"text\",\n            \"axisLabel\": \"\",\n            \"axisPlacement\": \"left\",\n            \"barAlignment\": 0,\n            \"drawStyle\": \"line\",\n            \"fillOpacity\": 10,\n            \"gradientMode\": \"none\",\n            \"hideFrom\": {\n              \"legend\": false,\n              \"tooltip\": false,\n              \"viz\": false\n            },\n            \"lineInterpolation\": \"linear\",\n            \"lineWidth\": 2,\n            \"pointSize\": 5,\n            \"scaleDistribution\": {\n              \"type\": \"linear\"\n            },\n            \"showPoints\": \"never\",\n            \"spanNulls\": true,\n            \"stacking\": {\n              \"group\": \"A\",\n              \"mode\": \"none\"\n            },\n            \"thresholdsStyle\": {\n              \"mode\": \"off\"\n            }\n          },\n          \"mappings\": [],\n          \"thresholds\": {\n            \"mode\": \"absolute\",\n            \"steps\": [\n              {\n                \"color\": \"green\",\n                \"value\": null\n              },\n              {\n                \"color\": \"red\",\n                \"value\": 80\n              }\n            ]\n          },\n          \"unit\": \"MiB\"\n        },\n        \"overrides\": []\n      },\n      \"gridPos\": {\n        \"h\": 8,\n        \"w\": 15,\n        \"x\": 9,\n        \"y\": 9\n      },\n      \"id\": 5,\n      \"options\": {\n        \"legend\": {\n          \"calcs\": [\n            \"lastNotNull\",\n            \"mean\"\n          ],\n          \"displayMode\": \"table\",\n          \"placement\": \"right\",\n          \"showLegend\": true,\n          \"sortBy\": \"Last *\",\n          \"sortDesc\": true\n        },\n        \"tooltip\": {\n          \"mode\": \"single\",\n          \"sort\": \"none\"\n        }\n      },\n      \"targets\": [\n        {\n          \"datasource\": {\n            \"type\": \"prometheus\",\n            \"uid\": \"iLkJX_A4z\"\n          },\n          \"editorMode\": \"code\",\n          \"expr\": \"container_memory_usage_bytes{name!=\\\"\\\"} \/ (1024*1024)\",\n          \"legendFormat\": \"{{name}}\",\n          \"range\": true,\n          \"refId\": \"A\"\n        }\n      ],\n      \"title\": \"Memory Usage\",\n      \"type\": \"timeseries\"\n    },\n    {\n      \"datasource\": {\n        \"type\": \"prometheus\",\n        \"uid\": \"iLkJX_A4z\"\n      },\n      \"fieldConfig\": {\n        \"defaults\": {\n          \"color\": {\n            \"mode\": \"palette-classic\"\n          },\n          \"custom\": {\n            \"axisCenteredZero\": false,\n            \"axisColorMode\": \"text\",\n            \"axisLabel\": \"\",\n            \"axisPlacement\": \"auto\",\n            \"barAlignment\": 0,\n            \"drawStyle\": \"line\",\n            \"fillOpacity\": 0,\n            \"gradientMode\": \"none\",\n            \"hideFrom\": {\n              \"legend\": false,\n              \"tooltip\": false,\n              \"viz\": false\n            },\n            \"lineInterpolation\": \"linear\",\n            \"lineWidth\": 1,\n            \"pointSize\": 5,\n            \"scaleDistribution\": {\n              \"type\": \"linear\"\n            },\n            \"showPoints\": \"auto\",\n            \"spanNulls\": false,\n            \"stacking\": {\n              \"group\": \"A\",\n              \"mode\": \"none\"\n            },\n            \"thresholdsStyle\": {\n              \"mode\": \"off\"\n            }\n          },\n          \"mappings\": [],\n          \"thresholds\": {\n            \"mode\": \"absolute\",\n            \"steps\": [\n              {\n                \"color\": \"green\",\n                \"value\": null\n              },\n              {\n                \"color\": \"red\",\n                \"value\": 80\n              }\n            ]\n          },\n          \"unit\": \"KBs\"\n        },\n        \"overrides\": []\n      },\n      \"gridPos\": {\n        \"h\": 8,\n        \"w\": 15,\n        \"x\": 0,\n        \"y\": 17\n      },\n      \"id\": 7,\n      \"options\": {\n        \"legend\": {\n          \"calcs\": [\n            \"mean\"\n          ],\n          \"displayMode\": \"table\",\n          \"placement\": \"right\",\n          \"showLegend\": true,\n          \"sortBy\": \"Mean\",\n          \"sortDesc\": true\n        },\n        \"tooltip\": {\n          \"mode\": \"single\",\n          \"sort\": \"none\"\n        }\n      },\n      \"targets\": [\n        {\n          \"datasource\": {\n            \"type\": \"prometheus\",\n            \"uid\": \"iLkJX_A4z\"\n          },\n          \"editorMode\": \"code\",\n          \"expr\": \"sum(rate(container_network_receive_bytes_total{name=~\\\".+\\\"}[5m])) by (name)\",\n          \"legendFormat\": \"{{name}}\",\n          \"range\": true,\n          \"refId\": \"A\"\n        }\n      ],\n      \"title\": \"Received Network Traffic (Rx)\",\n      \"type\": \"timeseries\"\n    }\n  ],\n  \"schemaVersion\": 37,\n  \"style\": \"dark\",\n  \"tags\": [],\n  \"templating\": {\n    \"list\": [\n      {\n        \"datasource\": {\n          \"type\": \"prometheus\",\n          \"uid\": \"iLkJX_A4z\"\n        },\n        \"filters\": [],\n        \"hide\": 0,\n        \"name\": \"Filters\",\n        \"skipUrlSync\": false,\n        \"type\": \"adhoc\"\n      }\n    ]\n  },\n  \"time\": {\n    \"from\": \"now-6h\",\n    \"to\": \"now\"\n  },\n  \"timepicker\": {},\n  \"timezone\": \"\",\n  \"title\": \"Docker Container Metrics\",\n  \"uid\": \"s8x5QuA4k\",\n  \"version\": 8,\n  \"weekStart\": \"\"\n}\n<\/code><\/pre>\n\n\n\n<p>You can also check <a href=\"https:\/\/grafana.com\/grafana\/dashboards\/?category=docker\" target=\"_blank\" rel=\"noreferrer noopener\">community created dashboards<\/a> an import any that might impress you.<\/p>\n\n\n\n<p>That marks the end of our guide on using Grafana to monitor Docker containers metrics.<\/p>\n\n\n\n<p>Read more about <a href=\"https:\/\/github.com\/google\/cadvisor\/blob\/master\/docs\/storage\/prometheus.md#prometheus-container-metrics\" target=\"_blank\" rel=\"noreferrer noopener\">cAdvisor Prometheus metrics<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-monitor-docker-containers-using-nagios\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Monitor Docker Containers using Nagios<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-check-docker-container-ram-and-cpu-usage\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Check Docker Container RAM and CPU Usage<\/a><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/04\/prometheus-grafana-data-source.png\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do I monitor Docker containers in Grafana? Well, in this tutorial, you will learn how to monitor Docker containers metrics using Grafana. Grafana is<\/p>\n","protected":false},"author":10,"featured_media":15468,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,1076,1077,301,121,294],"tags":[6351,6352,6350],"class_list":["post-15397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-containers","category-docker","category-grafana","category-howtos","category-prometheus","tag-collect-docker-metrics-with-cadvisor","tag-docker-containers-metrics-grafana-dashboard","tag-monitor-docker-containers-metrics-using-grafana","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15397"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=15397"}],"version-history":[{"count":28,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15397\/revisions"}],"predecessor-version":[{"id":22927,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15397\/revisions\/22927"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/15468"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=15397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=15397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=15397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}