{"id":19177,"date":"2024-10-01T18:35:00","date_gmt":"2024-10-01T13:05:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=19177"},"modified":"2024-10-01T18:35:28","modified_gmt":"2024-10-01T13:05:28","slug":"a-fun-and-easy-guide-to-monitoring-and-observability-with-prometheus","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2024\/10\/01\/a-fun-and-easy-guide-to-monitoring-and-observability-with-prometheus\/","title":{"rendered":"A Fun and Easy Guide to Monitoring and Observability With Prometheus"},"content":{"rendered":"<p id=\"2806\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">Hi Guys !! I am back with another interesting blog where we learn the concepts but in a funny and easy way.<\/p>\n<h1 id=\"6973\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\">What is Prometheus ?<\/h1>\n<p id=\"11fb\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Boring Version \ud83d\udca4\ud83d\udca4<\/strong><\/p>\n<p id=\"87fe\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Prometheus<\/strong>\u00a0is an open-source monitoring and alerting toolkit originally developed by SoundCloud in 2012. It was designed to monitor systems, track metrics, and trigger alerts based on those metrics. Prometheus uses a powerful query language called PromQL to collect and analyze time-series data from various services and applications. It stores data in a time-series database, making it easy to track trends over time. Prometheus is now a part of the Cloud Native Computing Foundation (CNCF) and is widely used in cloud-native environments for monitoring microservices, containers, and more.<\/p>\n<p id=\"12c4\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Funny Version \ud83d\ude02\ud83d\ude02<\/strong><\/p>\n<p id=\"2062\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">Imagine throwing a party where you need to keep track of everything \u2014 from who\u2019s dancing to how loud the music is. Prometheus is like your super-organized friend who monitors it all in real-time, sending you alerts if the punch bowl is low or if a conga line breaks out. Born at SoundCloud in 2012, Prometheus quickly became the ultimate party planner for techies, ensuring everything runs smoothly in the cloud-native world.<\/p>\n<p data-selectable-paragraph=\"\"><!--more--><\/p>\n<p id=\"1f0e\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk ajb\" data-selectable-paragraph=\"\"><span class=\"l ajc ajd aje bo ajf ajg ajh aji ajj gh\">H<\/span><strong class=\"ahu nu\">istory of The Prom King Fun Version \ud83d\ude02\ud83d\ude02<\/strong><\/p>\n<figure class=\"ajl ajm ajn ajo ajp adu ado adp paragraph-image\">\n<div class=\"adv adw gh adx bh ady\" role=\"button\">\n<div class=\"ado adp ajk\"><img loading=\"lazy\" decoding=\"async\" class=\"bh sw adz c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:381\/1*hNWKCxQvUAX-yuXpXeNRhg.gif\" alt=\"\" width=\"346\" height=\"401\" \/><\/div>\n<\/div>\n<\/figure>\n<h1 id=\"352c\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\"><strong class=\"al\">Prometheus \u2014 The Prom King \ud83d\udc51<\/strong><\/h1>\n<p id=\"06ee\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">The Legendary Tale of Prometheus at Cloudville High<\/strong>: In the chaotic halls of Cloudville High, the microservice students were out of control, forming cliques and causing havoc. The teachers (aka developers) were losing their minds trying to keep order. The old hall monitors (those outdated monitoring tools) were as effective as a chocolate teapot \u2014 by the time they reported a problem, the cafeteria was already a mashed potato war zone.<\/p>\n<p id=\"eb14\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Enter Prometheus, the Prom King<\/strong>: Prometheus wasn\u2019t just any new kid; he was the cool transfer from SoundCloud High with a special talent \u2014 he knew when trouble was about to start. Instead of waiting for the fire alarm, Prometheus was in the halls, checking on the jocks (servers), nerds (databases), and artsy kids (containers) before mischief could unfold.<\/p>\n<p id=\"34bd\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">The Rise of the Prom King<\/strong>: Prometheus\u2019s journey began at SoundCloud High, where chaos reigned and the old methods weren\u2019t cutting it. The teachers called in Prometheus, who didn\u2019t just wait for problems \u2014 he sniffed them out early. Soon, everyone knew Prometheus was the go-to guy to keep the cafeteria from turning into a disaster zone.<\/p>\n<p id=\"8775\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Why Prometheus Won the Prom King Crown<\/strong>: Prometheus turned Cloudville High from a disaster into a smooth operation. While old hall monitors were filing reports after the fact, Prometheus was already preventing food fights. His secret? PromQL, a language that let him ask the right questions at the right time, stopping trouble before it even started.<\/p>\n<p id=\"cabd\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">The Prom King\u2019s Winning Strategy<\/strong>: Prometheus wasn\u2019t about sitting back and waiting. He knew Cloudville High was unpredictable, so he took a proactive approach. By regularly checking in on everyone, he kept tabs on all the drama and made sure no one was starting a flash mob in the gym without his knowledge.<\/p>\n<p id=\"0bb3\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Prometheus\u2019s Royal Duties<\/strong>: Now the reigning prom king, Prometheus rules the school. Whether it\u2019s tracking down the class clown or keeping the dance floor from turning into a mosh pit, he\u2019s got it covered. Prometheus has become the linchpin of Cloudville High, ensuring every service behaves and every party rocks.<\/p>\n<p id=\"7c17\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">Before understanding Prometheus We will try to understand some necessary prerequisites\u00a0<strong class=\"ahu nu\">Observability and Monitoring.<\/strong><\/p>\n<p id=\"0dc1\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">OBSERVABILITY AND MONITORING<\/strong><\/p>\n<p id=\"bbd5\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Observability \ud83d\udca4<br \/>\n<\/strong>The ability to understand the internal state of a system by analyzing its outputs (logs, metrics, traces).<\/p>\n<p id=\"c5ea\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Monitoring \ud83d\udca4<br \/>\n<\/strong>The process of collecting, analyzing, and acting on predefined metrics and logs.<\/p>\n<h1 id=\"a906\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\"><strong class=\"al\">Now Our Version fun Version \ud83d\ude02\ud83d\ude02<\/strong><\/h1>\n<h1 id=\"f542\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\">The Hilarious Coffee Shop Chronicles \ud83c\udfea<\/h1>\n<p id=\"6757\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Scenario<\/strong>: You run \u201cJava the Hut,\u201d a quirky little coffee shop where everything from the espresso machine to the muffin display has a mind of its own. You\u2019re determined to keep the place running like a well-oiled (or well-brewed) machine, but chaos is always lurking around the corner.<\/p>\n<h1 id=\"3d73\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\">Monitoring: The Clueless Security Guard \ud83e\udeaa<\/h1>\n<ul class=\"\">\n<li id=\"cf41\" class=\"ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">What It Is<\/strong>: Monitoring is like having Bob, the clueless security guard, who\u2019s great at staring at specific things but not so great at connecting the dots. Bob\u2019s job is to keep an eye on the entrance, the cash register, and the muffin display, and he has a walkie-talkie to alert you when something goes wrong.<\/li>\n<li id=\"e8ac\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">How It Works<\/strong>: Bob\u2019s trained to shout into the walkie-talkie when specific things happen. \u201cHey boss, the muffin tray\u2019s empty!\u201d or \u201cUh, we\u2019ve got 20 people lined up for coffee, and it\u2019s looking like a zombie apocalypse out here!\u201d<\/li>\n<li id=\"0a13\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Example<\/strong>: Bob\u2019s walkie-talkie crackles: \u201cNo more coffee in the pot! Panic!\u201d You rush out to refill it, but Bob doesn\u2019t know\u00a0<em class=\"ajy\">why<\/em>\u00a0everyone is grumbling while they wait.<\/li>\n<li id=\"715d\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Limitation<\/strong>: Bob can tell you something\u2019s wrong, but he\u2019s not exactly Sherlock Holmes. If the shop\u2019s quieter than usual, Bob\u2019s just scratching his head, unaware that the coffee tastes like burnt rubber today.<\/li>\n<\/ul>\n<h1 id=\"2ddc\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\">Observability: The Gossiping Barista Brigade \ud83c\udf75<\/h1>\n<ul class=\"\">\n<li id=\"ac6a\" class=\"ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">What It Is<\/strong>: Observability is like your team of baristas, who double as the nosiest bunch of people on the planet. They know everything \u2014 what\u2019s happening, why it\u2019s happening, and who\u2019s to blame (usually Steve, the part-time barista who forgets to clean the espresso machine).<\/li>\n<li id=\"6f09\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">How It Works<\/strong>: Your baristas (logs, metrics, traces) don\u2019t just make coffee; they\u2019re like your own personal intelligence agency. They overhear customer complaints, notice trends (like when that hipster in the corner switches from a double espresso to a matcha latte), and can tell you exactly why today\u2019s muffin sales are tanking.<\/li>\n<li id=\"9dc3\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Example<\/strong>: \u201cPsst,\u201d whispers one barista, \u201ceveryone\u2019s leaving because the coffee tastes like motor oil today. Steve must\u2019ve used the decaf beans by mistake.\u201d Not only do they spot the problem, but they also give you the dirt on\u00a0<em class=\"ajy\">why<\/em>\u00a0it\u2019s happening. Thanks to them, you\u2019re not just putting out fires \u2014 you\u2019re preventing them.<\/li>\n<li id=\"cbc7\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Advantage<\/strong>: With your baristas\u2019 keen observations, you can prevent disasters like \u201cMuffinageddon 2024\u201d before they happen. You know the\u00a0<em class=\"ajy\">why<\/em>\u00a0behind the chaos, so you can fix it with a smile (and a free coffee voucher to keep customers happy).<\/li>\n<\/ul>\n<h1 id=\"7fbf\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\">Why Choose Prometheus ? \ud83d\ude44<\/h1>\n<h1 id=\"2f2a\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\"><strong class=\"al\">Key Features<\/strong><\/h1>\n<p id=\"a25d\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\"><em class=\"ajy\">Boring Version \ud83d\udca4\ud83d\udca4<\/em><\/strong><\/p>\n<p id=\"df92\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Time-Series Data<\/strong>: Prometheus stores data as time-series, allowing for efficient retrieval and analysis of metrics over time.<\/p>\n<p id=\"b375\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">PromQL<\/strong>: The Prometheus Query Language (PromQL) enables powerful queries for aggregating and analyzing metrics data.<\/p>\n<p id=\"e3dc\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Alerting<\/strong>: Built-in alerting mechanisms that notify you of issues based on metrics thresholds.<\/p>\n<p id=\"d3ef\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Flexible Data Collection<\/strong>: Supports various data collection methods, including pull-based and push-based systems.<\/p>\n<p id=\"2943\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Service Discovery<\/strong>: Automatically discovers services and adjusts monitoring targets dynamically.<\/p>\n<p id=\"ff2f\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Scalability<\/strong>: Designed to scale horizontally, making it suitable for large and dynamic environments.<\/p>\n<p id=\"abbe\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\"><em class=\"ajy\">Funny Version \ud83d\ude02\ud83d\ude02<\/em><\/strong><\/p>\n<p id=\"cb75\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Time-Series Data<\/strong>: Prometheus is like a digital diary for your server\u2019s mood swings, recording every little detail so you can see how it\u2019s feeling over time.<\/p>\n<p id=\"e60b\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">PromQL<\/strong>: Think of PromQL as Prometheus\u2019s superpower \u2014 like having a magic wand that lets you ask, \u201cWhy is the server so cranky today?\u201d and actually get answers.<\/p>\n<p id=\"f34c\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Alerting<\/strong>: It\u2019s like having a personal assistant who not only tells you when the cake is burning but also why everyone\u2019s in a bad mood \u2014 before the cake even starts smoking.<\/p>\n<p id=\"9460\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Flexible Data Collection<\/strong>: Prometheus can gather data like a nosy neighbor \u2014 whether it\u2019s peeking through the window (pull-based) or having you send them the gossip (push-based).<\/p>\n<p id=\"b4d4\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Service Discovery<\/strong>: It\u2019s like Prometheus has an invisible radar, finding all your services and keeping tabs on them as they move around, so you\u2019re never left in the dark.<\/p>\n<p id=\"58c8\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Scalability<\/strong>: If Prometheus were a superhero, scaling would be its ability to grow into a giant and still keep track of every little thing without breaking a sweat.<\/p>\n<h1 id=\"de7b\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\"><strong class=\"al\">Use Cases of Prometheus<\/strong><\/h1>\n<p id=\"5bbd\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Boring Version \ud83d\udca4\ud83d\udca4<\/strong><\/p>\n<p id=\"d3a2\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Microservices Monitoring<\/strong>: Ideal for tracking the performance and health of microservices architectures.<\/p>\n<p id=\"f96d\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Container Monitoring<\/strong>: Works well with containerized environments like Docker and Kubernetes.<\/p>\n<p id=\"0d78\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Custom Metrics<\/strong>: Allows for the monitoring of custom metrics specific to your applications or infrastructure.<\/p>\n<p id=\"0b40\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Alerting and Incident Management<\/strong>: Facilitates proactive incident management through detailed alerts and notifications.<\/p>\n<p id=\"99ad\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Funny Version \ud83d\ude02\ud83d\ude02<\/strong><\/p>\n<p id=\"1ded\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Microservices Monitoring<\/strong>: Perfect for keeping an eye on all those chatty microservices that can\u2019t seem to stop gossiping about each other.<\/p>\n<p id=\"87cb\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Container Monitoring<\/strong>: Ideal for those containerized parties \u2014 Docker and Kubernetes love having Prometheus around to make sure no one\u2019s getting too wild.<\/p>\n<p id=\"3f79\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Custom Metrics<\/strong>: Whether you want to know how many cups of coffee your server has drunk or how often it sings in the middle of the night, Prometheus has you covered.<\/p>\n<p id=\"f92e\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Alerting and Incident Management<\/strong>: It\u2019s like having an alert system that knows when things are about to go sideways, giving you a heads-up so you can fix things before the chaos hits.<\/p>\n<h1 id=\"fb39\" class=\"ain aio aeb bf aip kv aiq kw kx ky air kz la lb ais lc ld le ait lf lg lh aiu li lj aiv bk\" data-selectable-paragraph=\"\"><strong class=\"al\">Installing Prometheus<\/strong><\/h1>\n<ul class=\"\">\n<li id=\"9287\" class=\"ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Download Prometheus<\/strong>: Head over to the\u00a0<a class=\"af ajz\" href=\"https:\/\/prometheus.io\/download\/\" target=\"_blank\" rel=\"noopener ugc nofollow\"><strong class=\"ahu nu\">Prometheus download page<\/strong><\/a>\u00a0and grab the latest version. Think of it like picking up the coolest new gadget for your tech collection.<\/li>\n<li id=\"a81b\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Unpack the Files<\/strong>: Extract the files like you\u2019re unwrapping a giant techie gift. Place them wherever you want, but don\u2019t lose track of where you put them \u2014 Prometheus doesn\u2019t come with a treasure map.<\/li>\n<li id=\"671d\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Start Prometheus<\/strong>: Open your terminal (that\u2019s your techie command center) and navigate to your Prometheus files. Launch it with:<\/li>\n<\/ul>\n<pre class=\"ajl ajm ajn ajo ajp aka akb akc bp akd bb bk\"><span id=\"6ad7\" class=\"ake aio aeb akb b bg akf akg l akh aki\" data-selectable-paragraph=\"\">.\/prometheus --config.file=prometheus.yml<\/span><\/pre>\n<p id=\"d8da\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">It\u2019s like hitting the power button on a spaceship \u2014 just make sure your config file is ready for liftoff.<\/p>\n<p id=\"73e6\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Basic configuration and Setup<\/strong><\/p>\n<ul class=\"\">\n<li id=\"0f86\" class=\"ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Tweak the Config File<\/strong>: Open up\u00a0<code class=\"cv akj akk akl akb b\">prometheus.yml<\/code>\u2014this is like giving Prometheus its personal diary where it records all its juicy data. Add the targets you want it to keep an eye on. For example:<\/li>\n<\/ul>\n<pre class=\"ajl ajm ajn ajo ajp aka akb akc bp akd bb bk\"><span id=\"0494\" class=\"ake aio aeb akb b bg akf akg l akh aki\" data-selectable-paragraph=\"\"><span class=\"hljs-attr\">scrape_configs:<\/span>\r\n  <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">job_name:<\/span> <span class=\"hljs-string\">'example'<\/span>\r\n    <span class=\"hljs-attr\">static_configs:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">targets:<\/span> [<span class=\"hljs-string\">'localhost:9090'<\/span>]<\/span><\/pre>\n<p id=\"1828\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">Think of this as setting up Prometheus\u2019s \u201cguest list\u201d for its data party.<\/p>\n<ul class=\"\">\n<li id=\"acd3\" class=\"ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Storage Setup<\/strong>: Configure where Prometheus will stash all its data goodies. This is like setting up a high-tech vault for your server\u2019s secrets.<\/li>\n<li id=\"185a\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Check for Smooth Operation<\/strong>: Launch Prometheus and peek at the logs \u2014 make sure it\u2019s not throwing a tantrum about configuration errors.<\/li>\n<\/ul>\n<h2 id=\"198b\" class=\"akm aio aeb bf aip tf akn io kx th ako ir la nz akp iu oc od akq ix og oh akr ja ok aks bk\" data-selectable-paragraph=\"\">Running Prometheus Locally and on the Cloud<\/h2>\n<ol class=\"\">\n<li id=\"30e6\" class=\"ahs aht aeb ahu b ahv aiw ahx ahy ahz aix aib aic nz aiy aie aif od aiz aih aii oh aja aik ail aim akt ajr ajs bk\" data-selectable-paragraph=\"\"><strong class=\"ahu nu\">Running Locally<\/strong>:<\/li>\n<\/ol>\n<ul class=\"\">\n<li id=\"1e5f\" class=\"ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Make sure Prometheus is all set up and ready for action.<\/li>\n<li id=\"e534\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Open your terminal and give Prometheus the command to launch:<\/li>\n<\/ul>\n<pre class=\"ajl ajm ajn ajo ajp aka akb akc bp akd bb bk\"><span id=\"b2d1\" class=\"ake aio aeb akb b bg akf akg l akh aki\" data-selectable-paragraph=\"\">.\/prometheus --config.file=prometheus.yml<\/span><\/pre>\n<ul class=\"\">\n<li id=\"8a4c\" class=\"ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Now, head to\u00a0<code class=\"cv akj akk akl akb b\">http:\/\/localhost:9090<\/code>\u00a0and check out your new dashboard. It\u2019s like Prometheus\u2019s personal online diary\u2014no peeking from strangers!<\/li>\n<\/ul>\n<p id=\"1341\" class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">2 .\u00a0<strong class=\"ahu nu\">Running on the Cloud<\/strong>:<\/p>\n<ul class=\"\">\n<li id=\"44d9\" class=\"ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Pick your favorite cloud provider (AWS, GCP, Azure) \u2014 it\u2019s like choosing where you want your data party to be hosted.<\/li>\n<li id=\"050f\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Deploy Prometheus on virtual machines or in a Kubernetes cluster. Set it up like you\u2019re putting together a techie extravaganza in the cloud.<\/li>\n<li id=\"386c\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Adjust your security settings to make sure only invited guests (or your network) can access your Prometheus party.<\/li>\n<li id=\"85fe\" class=\"ahs aht aeb ahu b ahv ajt ahx ahy ahz aju aib aic nz ajv aie aif od ajw aih aii oh ajx aik ail aim ajq ajr ajs bk\" data-selectable-paragraph=\"\">Access Prometheus via the public IP or domain your cloud provider gives you \u2014 now your cloud-based Prometheus can party in style.<\/li>\n<\/ul>\n<p class=\"pw-post-body-paragraph ahs aht aeb ahu b ahv ahw ahx ahy ahz aia aib aic nz aid aie aif od aig aih aii oh aij aik ail aim nl bk\" data-selectable-paragraph=\"\">So this was the\u00a0<strong class=\"ahu nu\">\u201cDay 1\u201d<\/strong>\u00a0I hope you like this Blog.<\/p>\n<p><strong>Blog Pundit:<\/strong>\u00a0 <a href=\"https:\/\/opstree.com\/blog\/\/author\/sandeep7c51ad81ba\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Sandeep Rawat<\/strong><\/a><\/p>\n<p><strong><a href=\"https:\/\/www.opstree.com\/contact-us?utm_source=wordpress&amp;utm_campaign=Learn-everything-about-Amazon-Cloudfront&amp;utm_id=Blog\">Opstree<\/a><\/strong> is an End to End DevOps solution provider<\/p>\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.opstree.com\/contact-us\" target=\"_blank\" rel=\"noreferrer noopener\">CONTACT US<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hi Guys !! I am back with another interesting blog where we learn the concepts but in a funny and easy way. What is Prometheus ? Boring Version \ud83d\udca4\ud83d\udca4 Prometheus\u00a0is an open-source monitoring and alerting toolkit originally developed by SoundCloud in 2012. It was designed to monitor systems, track metrics, and trigger alerts based on &hellip; <a href=\"https:\/\/opstree.com\/blog\/2024\/10\/01\/a-fun-and-easy-guide-to-monitoring-and-observability-with-prometheus\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A Fun and Easy Guide to Monitoring and Observability With Prometheus&#8221;<\/span><\/a><\/p>\n","protected":false},"author":244582682,"featured_media":19210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[28070474,2788],"tags":[768739293,16279507],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2024\/09\/Prometheus-\u2014-The-Prom-King-Part-1.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-4Zj","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/19177"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582682"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=19177"}],"version-history":[{"count":4,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/19177\/revisions"}],"predecessor-version":[{"id":19212,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/19177\/revisions\/19212"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/19210"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=19177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=19177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=19177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}