{"id":80470,"date":"2021-12-28T02:55:02","date_gmt":"2021-12-28T08:25:02","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=80470"},"modified":"2021-12-30T06:14:55","modified_gmt":"2021-12-30T11:44:55","slug":"prometheus-grafana-stack","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/","title":{"rendered":"What is Prometheus Grafana Stack ?"},"content":{"rendered":"<p>In this article, we are going to learn about a popular monitoring solution for cloud and containers, Prometheus Grafana stack!<\/p>\n<p><em>Prometheus<\/em> is an open source application which can scrap the real-time metrics to monitor events and also do real-time alerting.<\/p>\n<p><em>Grafana<\/em> is an analytical and visualization tool which is helpful to create interactive charts &amp; graphs from the data and alerts scraped from the monitoring tools.<\/p>\n<div id=\"WEB_ANSWERS_STANDARD_RESULT_24_I_LKYbKOIsiZ4-EP7_KRyA0__13\">\n<div class=\"g\">\n<div data-hveid=\"CBwQAA\" data-ved=\"2ahUKEwjyq_ypr4b1AhXIzDgGHW95BNkQFSgAegQIHBAA\">\n<div class=\"tF2Cxc\">Hence, when it comes to cloud (or) container operations and system administration, nothing could be more important than having tools that will help you sniff out potential problems when they happen. While one can\u2019t be certain of stopping every problem from materializing in the system, there are tools for cloud \/ container administrators out there today, that if properly used will reduce or at least mitigate the impact of such unforeseen occurrences as often as possible!<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>This is where the role of a monitoring stack comes into play.<\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#What_is_a_monitoring_stack\" >What is a monitoring stack ?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Why_do_we_need_a_monitoring_solution_for_Cloud_Containers\" >Why do we need a monitoring solution for Cloud &amp; Containers?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Common_problems_that_monitoring_solutions_can_detect_%E2%80%93\" >Common problems that monitoring solutions can detect &#8211;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Prometheus_Grafana_stack\" >Prometheus Grafana stack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#How_does_Prometheus_work_with_Grafana\" >How does Prometheus work with Grafana?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Prometheus_%E2%80%93_How_does_it_work\" >Prometheus &#8211;\u00a0How does it work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Grafana_%E2%80%93_A_short_tutorial\" >Grafana &#8211; A short tutorial<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Alertmanager\" >Alertmanager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Push_gateway\" >Push gateway<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Accessing_the_UI_of_these_components\" >Accessing the UI of these components<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.whizlabs.com\/blog\/prometheus-grafana-stack\/#Final_words\" >Final words<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_a_monitoring_stack\"><\/span>What is a monitoring stack ?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Monitoring stacks are responsible for analyzing each aspect of how one&#8217;s machine has been performing at a given time &#8211; whether it\u2019s the percentage of resources being used by processes specifically or <\/span><span style=\"font-weight: 400;\">if a specific process is crashing &amp; restarting frequently (which may indicate an error or bug), and even stats like who or what process started or shut down over a period of time &#8211; they&#8217;re constantly watching over the systems to make sure everything is running smoothly and efficiently.\u00a0<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_do_we_need_a_monitoring_solution_for_Cloud_Containers\"><\/span>Why do we need a monitoring solution for Cloud &amp; Containers?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Apart from this, there&#8217;s yet another reason why monitoring solutions are a necessity nowadays. As the tools and methods get improved, code gets created, tested, and shipped faster, with increased speed comes increased chances of making mistakes! It&#8217;s smart not to leave the software to chance! You can always trust your software code&#8230; but why take the risk? A monitoring solution helps in just that &#8211; by keeping an eye out for potential issues where they usually occur.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Common_problems_that_monitoring_solutions_can_detect_%E2%80%93\"><\/span>Common<span style=\"font-weight: 400;\"> problems that monitoring solutions can detect &#8211;<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><span style=\"font-weight: 400;\">Infrastructure failure due to an outage<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Resource wastage due to low utilization<\/span><\/li>\n<li><span style=\"font-weight: 400;\">No space left on disk<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Communication failure due to network outage<\/span><\/li>\n<li><span style=\"font-weight: 400;\">API errors due to code bugs<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">The most widely used monitoring solution for <a href=\"https:\/\/www.whizlabs.com\/blog\/containers-in-cloud-computing\/\">cloud and containers<\/a> is &#8211; <em>Prometheus-Grafana stack. <\/em><\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Prometheus_Grafana_stack\"><\/span>Prometheus Grafana stack<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">It\u2019s actually comprised of four components:-<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Prometheus: It gets the metrics data from the application &amp; stores it.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Grafana: Takes data from Prometheus to display on multiple visualizations.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Alert Manager: Gets alerts from Prometheus &amp; sends notifications.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Push gateway: Adds support for metrics that cannot be scrapped.<\/span><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"How_does_Prometheus_work_with_Grafana\"><\/span>How does Prometheus work with Grafana?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4>End-to-end Flow<\/h4>\n<p>Prometheus scrapes metrics from a variety of application endpoints and stores them in its internal database. Grafana then reads these metrics from Prometheus and displays visualizations and dashboards based on these metrics on its UI. Prometheus alerts can also be configured to send notifications to external systems, such that when an event occurs, Prometheus sends the alert data to the Alertmanager which in turn dynamically routes the alerts to different receivers such as email, Slack, or PagerDuty.<\/p>\n<p>Some applications do not tell you their metrics via dedicated endpoints and instead rely on an additional component called &#8220;exporter&#8221; to get their job done. An exporter reads internal data of a particular process and then exposes them through the given endpoint. They are used widely by many popular databases such as Postgres, Redis, etc.<\/p>\n<p>For metrics that don&#8217;t work with the push model of Prometheus up, a push gateway is utilized.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-80586 size-large\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-1024x388.png\" alt=\"prometheus-grafana-stack\" width=\"1024\" height=\"388\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-1024x388.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-300x114.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-768x291.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-1108x420.png 1108w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-640x243.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-681x258.png 681w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">In this article, we are going to see the important features &amp; installation procedures for these components. Though t<\/span><span style=\"font-weight: 400;\">hese components can be installed on any operating system, here &#8211; we are going to install them on Ubuntu 20 <\/span><span style=\"font-weight: 400;\">which is one of the <\/span><a href=\"https:\/\/www.whizlabs.com\/blog\/why-ubuntu-is-best-os-for-programming\/\"><span style=\"font-weight: 400;\">best linux os for programming<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>In this article, we are going to lay out the use case of each component and the steps on how to set up a complete monitoring solution. We&#8217;re using Ubuntu 20 here as an operating system; however, one can also use them in other operating systems as well.<\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s start with a quick guide !<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Prometheus_%E2%80%93_How_does_it_work\"><\/span>Prometheus &#8211;\u00a0How does it work?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">It works by pulling\/scrapping real-time metrics from applications at regular intervals of time by sending HTTP requests on metrics endpoints of applications. After the data is collected, it stores them in an internal time-series database.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">What makes it the de facto monitoring tool?<br \/>\n<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">There are two reasons &#8211;<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Its simple yet powerful data model and query language provide detailed and actionable metrics for the analysis of application and infrastructure performance.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">It doesn\u2019t require installation of any custom software or configuration on servers, or even in container images to enable collecting metrics.<\/span><\/li>\n<\/ul>\n<h4><span style=\"font-weight: 400;\">How to install Prometheus?<\/span><\/h4>\n<p>Let&#8217;s go over the step-by-step procedure.<\/p>\n<p>1. Add prometheus user:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"24d4\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo useradd --no-create-home prometheus<\/span><\/pre>\n<p id=\"86a5\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">2. Download and install the Prometheus binary:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"606c\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo mkdir \/etc\/prometheus\r\nsudo mkdir \/var\/lib\/prometheus\r\nwget <a class=\"dz jj\" href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.23.0\/prometheus-2.23.0.linux-amd64.tar.gz\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.30.3\/<\/a><a class=\"dz jj\" href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.30.3\/prometheus-2.30.3.linux-amd64.tar.gz\" target=\"_blank\" rel=\"noopener ugc nofollow\">prometheus-2.30.3.linux-amd64.tar.gz<\/a>\r\ntar -xvf prometheus-2.30.3.linux-amd64.tar.gz<\/span><\/pre>\n<p id=\"ab06\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">3. Copy files from prometheus setup:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"8c1b\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo cp prometheus-2.30.3.linux-amd64\/prometheus \/usr\/local\/bin\r\nsudo cp prometheus-2.30.3.linux-amd64\/promtool \/usr\/local\/bin\r\nsudo cp -r prometheus-2.30.3.linux-amd64\/consoles \/etc\/prometheus\/\r\nsudo cp -r prometheus-2.30.3.linux-amd64\/console_libraries \/etc\/prometheus\r\nsudo cp prometheus-2.30.3.linux-amd64\/promtool \/usr\/local\/bin\/<\/span><\/pre>\n<p id=\"7807\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">4. Adding content to prometheus\u2019s configuration file:<\/p>\n<ul class=\"\">\n<li id=\"b7d3\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq jk it iu gw\" data-selectable-paragraph=\"\">This is where we configure the time intervals in which prometheus will scrap the metrics.<\/li>\n<li id=\"8738\" class=\"hu hv fz bb b hw jl hy hz ia jm ic id ie jn ig ih ii jo ik il im jp io ip iq jk it iu gw\" data-selectable-paragraph=\"\">Here, we are telling prometheus to scrape the metrics it is generating. So that we can use these metrics later on.<\/li>\n<\/ul>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"2507\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">global:\r\n  scrape_interval: 15s\r\n  external_labels:\r\n    monitor: 'prometheus'\r\nscrape_configs:\r\n  - job_name: 'prometheus'\r\n    static_configs:\r\n      - targets: ['localhost:9090']<\/span><\/pre>\n<p id=\"3936\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">5. Give user \u2018prometheus\u2019 the permission to the file used to run prometheus server.<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"6bb1\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo chown prometheus:prometheus \/etc\/prometheus\r\nsudo chown prometheus:prometheus \/usr\/local\/bin\/prometheus\r\nsudo chown prometheus:prometheus \/usr\/local\/bin\/promtool\r\nsudo chown -R prometheus:prometheus \/etc\/prometheus\/consoles\r\nsudo chown -R prometheus:prometheus \/etc\/prometheus\/console_libraries\r\nsudo chown -R prometheus:prometheus \/var\/lib\/prometheus\/<\/span><\/pre>\n<p id=\"027b\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">6. Add the prometheus startup in the service script.<\/p>\n<ul class=\"\">\n<li id=\"6088\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq jk it iu gw\" data-selectable-paragraph=\"\">So that we can start, stop, restart &amp; check its status easily.<\/li>\n<\/ul>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"08a6\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo vim \/etc\/systemd\/system\/prometheus.service<\/span><\/pre>\n<p id=\"2006\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\"><em class=\"jq\">A service unit describes a service or application on the machine will be managed. It includes instructions for starting or stopping the service and many other things.<\/em><\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"d473\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">[Unit]\r\nDescription=Prometheus\r\nWants=network-online.target\r\nAfter=network-online.target\r\n\r\n<\/span><span id=\"8485\" class=\"gw jd je fz jf b du jr js jt ju jv jh s ji\" data-selectable-paragraph=\"\">[Service]\r\nUser=prometheus\r\nGroup=prometheus\r\nType=simple<\/span><span id=\"ccfe\" class=\"gw jd je fz jf b du jr js jt ju jv jh s ji\" data-selectable-paragraph=\"\">ExecStart=\/usr\/local\/bin\/prometheus --config.file \/etc\/prometheus\/prometheus.yml --storage.tsdb.path \/var\/lib\/prometheus\/ --web.console.templates=\/etc\/prometheus\/consoles --web.console.libraries=\/etc\/prometheus\/console_libraries\r\n\r\n<\/span><span id=\"48ae\" class=\"gw jd je fz jf b du jr js jt ju jv jh s ji\" data-selectable-paragraph=\"\">[Install]\r\nWantedBy=multi-user.target<\/span><\/pre>\n<p id=\"f2f2\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">7. Run the following to add the above service unit and start prometheus.<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"0ac0\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo systemctl daemon-reload\r\nsudo systemctl enable prometheus\r\nsudo systemctl start prometheus\r\nsudo systemctl status prometheus\r\n<\/span><\/pre>\n<p id=\"0386\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">The installation is complete. Prometheus occupies port 9090 by default.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Grafana_%E2%80%93_A_short_tutorial\"><\/span>Grafana &#8211; A short tutorial<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span style=\"font-weight: 400;\">What is Grafana?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Grafana is an open-source tool for displaying visualizations and metrics for analysis that support many 3rd party data sources such as Elasticsearch, Influxdb, Graphite, Prometheus, AWS Cloud Watch, and many others.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">How does it work?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Grafana can be thought of as the frontend of the monitoring solution i.e. it reads metrics data from Prometheus and displays the metrics in an organized fashion to the user via visualization and graphs.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">How to install Grafana?<\/span><\/h4>\n<p>Let&#8217;s go over the step-by-step procedure.<\/p>\n<p>1. Add grafana\u2019s required user:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"7795\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo apt-get install -y adduser libfontconfig1<\/span><\/pre>\n<p id=\"2471\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">2. Download &amp; install Grafana binary:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"d54a\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">wget <a class=\"dz jj\" href=\"https:\/\/dl.grafana.com\/oss\/release\/grafana_8.2.2_amd64.deb\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/dl.grafana.com\/oss\/release\/grafana_8.2.2_amd64.deb<\/a>\r\nsudo dpkg -i grafana_8.2.2_amd64.deb<\/span><\/pre>\n<p id=\"c582\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">3. Run the following to add the above service unit and start grafana.<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"45f9\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo systemctl daemon-reload\r\nsudo systemctl start grafana-server\r\nsudo systemctl status grafana-server\r\nsudo systemctl enable grafana-server.service<\/span><\/pre>\n<p id=\"a34f\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">The installation is complete. Grafana occupies port 3000 by default.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Alertmanager\"><\/span><span style=\"font-weight: 400;\">Alertmanager<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span style=\"font-weight: 400;\">How does alerting work?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">In a monitoring solution, the most crucial task is of alerting. Metrics collected are analyzed by Prometheus, If it finds something out of order such as memory utilization too high or too many process restarts then it triggers an alert so that a human intervenes.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">What is the role of an Alertmanager?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">This alerting mechanism is handled by the Alertmanager i.e. Prometheus sends alerts to the Alertmanager, which then sends out a notification requesting human intervention.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">How does Alertmanager help?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">It takes care of deduplicating, grouping, and routing the alerts to the correct receiver endpoints such as email, PagerDuty, or Slack. It also takes care of silencing and inhibition of alerts. In this way, it helps keep the monitoring solution efficient and reliable.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">How do we install Alertmanager?<\/span><\/h4>\n<p>Let&#8217;s go over the step-by-step procedure.<\/p>\n<p>1. Add an alertmanager user:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"94b3\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo useradd --no-create-home alertmanager<\/span><\/pre>\n<p id=\"45b3\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">2. Download and install the Prometheus binary:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"9011\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">wget <a class=\"dz ir\" href=\"https:\/\/github.com\/prometheus\/alertmanager\/releases\/download\/v0.20.0\/alertmanager-0.20.0.linux-amd64.tar.gz\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/github.com\/prometheus\/alertmanager\/releases\/download\/v0.23.0\/alertmanager-0.23.0.linux-amd64.tar.gz<\/a>\r\ntar xvfz alertmanager-0.23.0.linux-amd64.tar.gz<\/span><\/pre>\n<p id=\"1086\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">3. Create folders for use by alertmanager<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"2304\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo mkdir -p \/var\/lib\/alertmanager\r\nsudo mkdir -p \/etc\/alertmanager<\/span><\/pre>\n<p id=\"cddc\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">3. Copy files for alertmanager setup:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"5bfa\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo cp alertmanager-0.23.0.linux-amd64\/alertmanager \/usr\/local\/bin\/<\/span><\/pre>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"5bfa\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo cp alertmanager-0.23.0.linux-amd64\/alertmanager.yml  \/etc\/alertmanager<\/span><\/pre>\n<p id=\"a588\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">4. Assign ownership of files to alertmanager user<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"1973\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo chown alertmanager:alertmanager \/usr\/local\/bin\/alertmanager <\/span><\/pre>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"5a6a\" class=\"gw jd je fz jf b du jj jk jl jm jn jh s ji\" data-selectable-paragraph=\"\">sudo chown -R alertmanager:alertmanager \/etc\/alertmanager<\/span><\/pre>\n<p id=\"d899\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">5. Create a service file<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"21eb\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo vim \/etc\/systemd\/system\/alertmanager.service<\/span><\/pre>\n<p id=\"fb48\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">Contents &#8211;<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"82d8\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">[Unit]\r\nDescription=Prometheus Alertmanager\r\nWants=network-online.target\r\nAfter=network-online.target\r\n\r\n<\/span><span id=\"403a\" class=\"gw jd je fz jf b du jj jk jl jm jn jh s ji\" data-selectable-paragraph=\"\">[Service]\r\nUser=alertmanager\r\nGroup=alertmanager\r\nType=simple\r\nWorkingDirectory=\/etc\/alertmanager\/\r\nExecStart=\/usr\/local\/bin\/alertmanager\r\n--config.file \/etc\/alertmanager\/alertmanager.yml\r\n--storage.path \/var\/lib\/alertmanager\/\r\n\r\n<\/span><span id=\"68d1\" class=\"gw jd je fz jf b du jj jk jl jm jn jh s ji\" data-selectable-paragraph=\"\">[Install]\r\nWantedBy=multi-user.target<\/span><\/pre>\n<p id=\"bc5b\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">6. Run the following to add the above service unit and start alertmanager.<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"9bdd\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo systemctl daemon-reload\r\nsudo systemctl enable alertmanager\r\nsudo systemctl start alertmanager\r\nsudo systemctl status alertmanager<\/span><\/pre>\n<p id=\"db79\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">The installation is complete. Alertmanager occupies port 9093 by default.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Push_gateway\"><\/span><span style=\"font-weight: 400;\">Push gateway<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">The Pushgateway is <\/span>an intermediary component that allows the pushing of metrics from endpoints<span style=\"font-weight: 400;\"> that cannot be scrapped.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">When are they required?<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">In cases where applications die before they even have the chance to let Prometheus find them. <\/span><span style=\"font-weight: 400;\">For example, if you are using Kubernetes service discovery, and your pods do not live enough to be picked up by Prometheus. Then the typical pull model of Prometheus does not fit anymore because Prometheus cannot find or scrape all of the targets<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">What does it do?<\/span><\/h4>\n<p>You can send metrics data to the Pushgateway from your script\u2019s output that might have been cut off early, after which the metrics will be eventually ingested by Prometheus.<\/p>\n<h4><span style=\"font-weight: 400;\">How do we install Pushgateway?<\/span><\/h4>\n<p>Let&#8217;s go over the step-by-step procedure.<\/p>\n<p>1. Add a pushgateway user<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"7198\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo useradd --no-create-home pushgateway<\/span><\/pre>\n<p id=\"ee71\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">2. Download and install the Prometheus binary:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"1d31\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">wget <a class=\"dz ir\" href=\"https:\/\/github.com\/prometheus\/pushgateway\/releases\/download\/v1.2.0\/pushgateway-1.2.0.linux-amd64.tar.gz\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/github.com\/prometheus\/pushgateway\/releases\/download\/v1.4.2\/pushgateway-1.4.2.linux-amd64.tar.gz<\/a>\r\ntar xvfz pushgateway-1.4.2.linux-amd64.tar.gz<\/span><\/pre>\n<p id=\"2974\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">3. Copy files for pushgateway setup:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"4a62\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo cp pushgateway-1.4.2.linux-amd64\/pushgateway \/usr\/local\/bin\/<\/span><\/pre>\n<p id=\"6bb9\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">4. Assign ownership of files to pushgateway user:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"0c13\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo chown pushgateway:pushgateway \/usr\/local\/bin\/pushgateway<\/span><\/pre>\n<p id=\"42cc\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">5. Create a service file<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"8224\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo vi \/etc\/systemd\/system\/pushgateway.service<\/span><\/pre>\n<p id=\"a323\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">Contents:<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"48d1\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">[Unit]\r\nDescription=Prometheus Pushgateway\r\nWants=network-online.target\r\nAfter=network-online.target\r\n\r\n<\/span><span id=\"26b0\" class=\"gw jd je fz jf b du jj jk jl jm jn jh s ji\" data-selectable-paragraph=\"\">[Service]\r\nUser=pushgateway\r\nGroup=pushgateway\r\nType=simple\r\nExecStart=\/usr\/local\/bin\/pushgateway\r\n\r\n<\/span><span id=\"a83f\" class=\"gw jd je fz jf b du jj jk jl jm jn jh s ji\" data-selectable-paragraph=\"\">[Install]\r\nWantedBy=multi-user.target<\/span><\/pre>\n<p id=\"6c95\" class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\" data-selectable-paragraph=\"\">6. Run the following to add the above service unit and start pushgateway.<\/p>\n<pre class=\"iv iw ix iy iz ja jb jc\"><span id=\"e048\" class=\"gw jd je fz jf b du jg jh s ji\" data-selectable-paragraph=\"\">sudo systemctl daemon-reload\r\nsudo systemctl enable pushgateway\r\nsudo systemctl start pushgateway\r\nsudo systemctl status pushgateway<\/span><\/pre>\n<p class=\"hu hv fz bb b hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq dn gw\">The installation is complete. Pushgateway occupies port 9091 by default.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Accessing_the_UI_of_these_components\"><\/span>Accessing the UI of these components<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For accessing the UI of each component, the port must be reachable from outside the server. The way to do differs in each cloud provider. For e.g. In AWS, we need to add an entry for the corresponding ports in the security group and make it accessible from anywhere.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Final_words\"><\/span>Final words<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Until now, we have understood the function and use case of each component in the monitoring solution, as well as went through the importance of the whole monitoring solution in general.<\/p>\n<p>We encourage you to explore more about the components we have described in this tutorial so that you can do some hands-on exercises as well. Why not try connecting Grafana with Prometheus and set up alerts from Alertmanager to Prometheus? Or even attempt something such as setting up alert receivers in AlertManager?<\/p>\n<p><span style=\"font-weight: 400;\">These <\/span><a href=\"https:\/\/www.whizlabs.com\/blog\/top-cloud-monitoring-tools\/\"><span style=\"font-weight: 400;\">monitoring tools for cloud<\/span><\/a><span style=\"font-weight: 400;\"> and containers <\/span>are so priceless that they&#8217;re like the Swiss army knife of every team! These tools will never go out of application stacks! They&#8217;re essential to almost every team, so make sure you know how to use them properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to learn about a popular monitoring solution for cloud and containers, Prometheus Grafana stack! Prometheus is an open source application which can scrap the real-time metrics to monitor events and also do real-time alerting. Grafana is an analytical and visualization tool which is helpful to create interactive charts &amp; graphs from the data and alerts scraped from the monitoring tools. Hence, when it comes to cloud (or) container operations and system administration, nothing could be more important than having tools that will help you sniff out potential problems when they happen. While one can\u2019t [&hellip;]<\/p>\n","protected":false},"author":357,"featured_media":80592,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[10,1862],"tags":[4796,4810],"class_list":["post-80470","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-computing-certifications","category-devops","tag-prometheus-grafana-tutorial","tag-why-do-we-need-cloud-monitoring"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack-300x169.png",300,169,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",24,14,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",48,27,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",96,54,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",150,84,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",300,169,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",560,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",96,54,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/12\/prometheus-grafana-stack.png",150,84,false]},"uagb_author_info":{"display_name":"Shishir Khandelwal","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/shishir-khandelwal\/"},"uagb_comment_info":100,"uagb_excerpt":"In this article, we are going to learn about a popular monitoring solution for cloud and containers, Prometheus Grafana stack! Prometheus is an open source application which can scrap the real-time metrics to monitor events and also do real-time alerting. Grafana is an analytical and visualization tool which is helpful to create interactive charts &amp;&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/357"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=80470"}],"version-history":[{"count":30,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80470\/revisions"}],"predecessor-version":[{"id":80887,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80470\/revisions\/80887"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/80592"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=80470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=80470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=80470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}