title
How Prometheus Monitoring works | Prometheus Architecture explained

description
► Part of the DevOps Bootcamp 🚀 More infos here: https://bit.ly/41Wc1cM Fully understand how Prometheus Monitoring works | Explaining Prometheus Architecture | What is Prometheus Monitoring | Prometheus Monitoring Tutorial Demo Part 1: Setup Prometheus Monitoring and Grafana on Kubernetes using Prometheus Operator ► https://youtu.be/QoDqxm7ybLc Demo Part 2: In the 2nd part we will actually configure Prometheus to expose /metrics endpoint and configure Prometheus to scrape it. ► https://youtu.be/mLPg49b33sA 🤓 Prometheus has become the mainstream monitoring tool of choice in container and microservice world. 🔥 In this video you will learn: 1) Why Prometheus is so important in such infrastructure and what are some specific use cases 2) How Prometheus works? What are targets and metrics? 3) How does Prometheus collect those metrics from its targets? 4) Furthermore, I explain Prometheus Architecture with simple diagrams and animations and go through the main components: Prometheus Server, Pushgateway, Alertmanager 5) The advantages of Prometheus Pull System compared to alternative monitoring tools, which use Push System 6) Using Prometheus Monitoring with Docker and Kubernetes You will also understand better why it’s important to monitor your applications/infrastructure in general. ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬ 0:00 - Intro 0:31 - What is Prometheus? 1:06 - Where and why is Prometheus used? 2:21 - Specific Use Cases for using Prometheus Monitoring 5:57 - How does Prometheus work? Prometheus Architecture explained 6:04 - Prometheus Server 7:02 - Targets and Metrics 7:53 - Metrics 8:50 - How does Prometheus collect those metrics from targets? 9:21 - Target Endpoints and Exporters 11:12 - Monitoring your own application 12:03 - Pull Mechanism - Unique advantage of Prometheus 13:38 - Pushgateway for short-lived jobs 14:14 - Configuring Prometheus - Example YAML Configuration 16:20 - Alert Manager - Triggering alerts 16:55 - Prometheus Data Storage - Where does Prometheus store the data? 17:38 - PromQL Query Language 18:37 - My Experience 19:23 - Key Characteristics - advantages and disadvantages of Prometheus 20:40 - Prometheus Monitoring with Docker and Kubernetes ▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬ Official Prometheus Exporters List ► https://prometheus.io/docs/instrumenting/exporters/ Prometheus Client Libraries ► https://prometheus.io/docs/instrumenting/clientlibs/ Photo source for Metrics Example: https://itnext.io/prometheus-for-beginners-5f20c2e89b6c #prometheus #prometheusmonitoring #devops #techworldwithnana ▬▬▬▬▬▬ Want to learn more? 🚀 ▬▬▬▬▬▬ Full Kubernetes and Docker tutorial ► https://bit.ly/2YGeRp9 What is Kubernetes? ► https://youtu.be/VnvRFRk_51k Complete Jenkins Pipeline Tutorial ► https://youtu.be/7KCS70sCoK0 ▬▬▬▬▬▬ Courses & Bootcamp & Ebooks 🚀 ▬▬▬▬▬▬ ► Become a DevOps Engineer - full educational program 👉🏼 https://bit.ly/45mXaer ► High-Quality and Hands-On Courses 👉🏼 https://bit.ly/3BNS8Kv ► Kubernetes 101 - compact and easy-to-read ebook bundle 👉🏼 https://bit.ly/3Ozl28x ▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬ Join private Facebook group ► https://bit.ly/32UVSZP DEV ► https://bit.ly/3h2fqiO INSTAGRAM ► https://bit.ly/2F3LXYJ TWITTER ► https://bit.ly/3i54PUB LINKEDIN ► https://bit.ly/3hWOLVT

detail
{'title': 'How Prometheus Monitoring works | Prometheus Architecture explained', 'heatmap': [{'end': 428.665, 'start': 395.388, 'weight': 0.739}, {'end': 478.396, 'start': 461.927, 'weight': 0.952}, {'end': 546.828, 'start': 523.152, 'weight': 0.95}, {'end': 570.054, 'start': 549.227, 'weight': 0.829}], 'summary': 'Prometheus monitoring is crucial in modern infrastructure, addressing challenges in devops, providing automated monitoring, alerting, metrics collection, and configuration for containerized environments and kubernetes deployment, ensuring efficient resource management and preventing downtimes.', 'chapters': [{'end': 321.62, 'segs': [{'end': 41.741, 'src': 'embed', 'start': 19.98, 'weight': 0, 'content': [{'end': 28.345, 'text': "We're going to see an example configuration and also some of these key characteristics why it became so widely accepted and popular,", 'start': 19.98, 'duration': 8.365}, {'end': 30.386, 'text': 'especially in containerized environments.', 'start': 28.345, 'duration': 2.041}, {'end': 41.741, 'text': 'Prometheus was created to monitor highly dynamic container environments like Kubernetes, Docker Swarm, etc.', 'start': 33.476, 'duration': 8.265}], 'summary': 'Prometheus monitors dynamic container environments like kubernetes, docker swarm, widely accepted and popular.', 'duration': 21.761, 'max_score': 19.98, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg19980.jpg'}, {'end': 102.552, 'src': 'embed', 'start': 66.298, 'weight': 2, 'content': [{'end': 72.063, 'text': 'Modern DevOps is becoming more and more complex to handle manually and therefore needs more automation.', 'start': 66.298, 'duration': 5.765}, {'end': 81.032, 'text': 'So, typically you have multiple servers that run containerized applications and there are hundreds of different processes running on that infrastructure.', 'start': 72.704, 'duration': 8.328}, {'end': 83.294, 'text': 'and things are interconnected.', 'start': 81.432, 'duration': 1.862}, {'end': 89.94, 'text': 'So maintaining such set up to run smoothly and without application downtimes is very challenging.', 'start': 83.875, 'duration': 6.065}, {'end': 102.552, 'text': 'Imagine having such a complex infrastructure with loads of servers distributed over many locations and you have no insight of what is happening on hardware level or on application level.', 'start': 90.741, 'duration': 11.811}], 'summary': 'Modern devops requires automation to manage complex, interconnected infrastructure and processes, ensuring smooth operation and minimizing downtime.', 'duration': 36.254, 'max_score': 66.298, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg66298.jpg'}, {'end': 141.076, 'src': 'embed', 'start': 116.025, 'weight': 3, 'content': [{'end': 123.209, 'text': 'When you have tons of services and applications deployed, any one of them can crash and cause failure of other services.', 'start': 116.025, 'duration': 7.184}, {'end': 129.352, 'text': 'And when you have so many moving pieces and suddenly application becomes unavailable to users,', 'start': 123.73, 'duration': 5.622}, {'end': 135.374, 'text': 'you must quickly identify what exactly out of this hundred different things went wrong.', 'start': 129.352, 'duration': 6.022}, {'end': 141.076, 'text': 'And that could be difficult and time consuming when debugging the system manually.', 'start': 135.974, 'duration': 5.102}], 'summary': 'Multiple services can fail, making it hard to identify issues among many components.', 'duration': 25.051, 'max_score': 116.025, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg116025.jpg'}, {'end': 236.709, 'src': 'embed', 'start': 209.884, 'weight': 4, 'content': [{'end': 223.936, 'text': 'But what will make this searching the problem process more efficient would be to have a tool that constantly monitors whether services are running and alerts the maintainers as soon as one service crashes.', 'start': 209.884, 'duration': 14.052}, {'end': 227.099, 'text': 'So you know exactly what happened or even better.', 'start': 224.397, 'duration': 2.702}, {'end': 236.709, 'text': 'It identifies problems before they even occur and alerts the system administrators responsible for that infrastructure to prevent that issue.', 'start': 227.38, 'duration': 9.329}], 'summary': 'Efficiently monitor services, alert on crashes, and prevent issues for system administrators.', 'duration': 26.825, 'max_score': 209.884, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg209884.jpg'}], 'start': 1.109, 'title': 'Prometheus monitoring tool and challenges in modern devops', 'summary': 'Discusses the importance of prometheus in modern infrastructure, particularly in containerized environments, emphasizing its use cases and key characteristics. it also covers the challenges of managing complex devops infrastructure and the need for automation to monitor and prevent issues like server failures, application downtimes, and resource constraints.', 'chapters': [{'end': 65.757, 'start': 1.109, 'title': 'Prometheus monitoring tool', 'summary': 'Discusses the importance of prometheus in modern infrastructure, particularly in containerized environments, and its widespread acceptance as a mainstream monitoring tool, with a focus on its use cases and key characteristics.', 'duration': 64.648, 'highlights': ['Prometheus is widely accepted and popular, especially in containerized environments, and has become the mainstream monitoring tool of choice in container and microservice world.', 'Prometheus was created to monitor highly dynamic container environments like Kubernetes, Docker Swarm, etc.', 'Prometheus can also be used in traditional non-container infrastructure with just bare servers and applications deployed directly on it.']}, {'end': 321.62, 'start': 66.298, 'title': 'Challenges in modern devops', 'summary': 'Discusses the challenges of managing complex devops infrastructure, highlighting the need for automation to monitor and prevent issues, such as server failures, application downtimes, and resource constraints.', 'duration': 255.322, 'highlights': ['Managing complex DevOps infrastructure Handling multiple servers with containerized applications and interconnected processes makes maintaining smooth operations challenging.', 'Impact of server failure on applications A scenario is described where a server running out of memory caused a chain of failures, leading to application unavailability and user authentication issues.', 'Need for automated monitoring and alerts Emphasizes the importance of tools that constantly monitor services, alert maintainers about potential issues, and identify problems before they occur.']}], 'duration': 320.511, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg1109.jpg', 'highlights': ['Prometheus is widely accepted and popular in containerized environments, becoming the mainstream monitoring tool.', 'Prometheus was created to monitor highly dynamic container environments like Kubernetes, Docker Swarm, etc.', 'Managing complex DevOps infrastructure is challenging due to multiple servers with containerized applications and interconnected processes.', 'The impact of server failure on applications is significant, causing a chain of failures and leading to application unavailability and user authentication issues.', 'Emphasizes the importance of automated monitoring tools that constantly monitor services, alert maintainers about potential issues, and identify problems before they occur.']}, {'end': 530.538, 'segs': [{'end': 373.23, 'src': 'embed', 'start': 345.379, 'weight': 1, 'content': [{'end': 347.88, 'text': 'can give you timely alert to fix the issue.', 'start': 345.379, 'duration': 2.501}, {'end': 357.464, 'text': 'And such automated monitoring and alerting is exactly what Prometheus offers as a part of a modern DevOps workflow.', 'start': 348.62, 'duration': 8.844}, {'end': 361.045, 'text': 'So how does Prometheus actually work?', 'start': 358.064, 'duration': 2.981}, {'end': 363.346, 'text': 'or how does it architecture actually looks like?', 'start': 361.045, 'duration': 2.301}, {'end': 368.828, 'text': 'And its core, Prometheus has the main component called Prometheus server.', 'start': 364.386, 'duration': 4.442}, {'end': 373.23, 'text': 'that does the actual monitoring work and is made up of three parts.', 'start': 368.828, 'duration': 4.402}], 'summary': 'Prometheus offers timely alerts for monitoring in a devops workflow.', 'duration': 27.851, 'max_score': 345.379, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg345379.jpg'}, {'end': 454.244, 'src': 'heatmap', 'start': 395.388, 'weight': 0, 'content': [{'end': 402.252, 'text': 'servers and other target resources and storing them or pushing them into the database.', 'start': 395.388, 'duration': 6.864}, {'end': 410.352, 'text': 'And third, it has a web server or server API that accepts queries for that stored data,', 'start': 403.109, 'duration': 7.243}, {'end': 417.656, 'text': 'and that web server component or the server API is used to display the data in a dashboard or UI,', 'start': 410.352, 'duration': 7.304}, {'end': 422.718, 'text': 'either through Prometheus dashboard or some other data visualization tool like Grafana.', 'start': 417.656, 'duration': 5.062}, {'end': 428.665, 'text': 'So the Prometheus server monitors a particular thing, and that thing could be anything.', 'start': 423.058, 'duration': 5.607}, {'end': 431.849, 'text': 'It could be an entire Linux server or Windows server.', 'start': 428.745, 'duration': 3.104}, {'end': 437.957, 'text': 'It could be a standalone Apache server, a single application or service like a database.', 'start': 431.869, 'duration': 6.088}, {'end': 447.521, 'text': 'And those things that Prometheus monitors are called targets and each target has units of monitoring for Linux server target.', 'start': 438.638, 'duration': 8.883}, {'end': 454.244, 'text': 'It could be a current CPU status, its memory usage, disk space usage, et cetera.', 'start': 447.601, 'duration': 6.643}], 'summary': 'Prometheus monitors various targets and visualizes data through web server or api', 'duration': 51.135, 'max_score': 395.388, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg395388.jpg'}, {'end': 488.643, 'src': 'heatmap', 'start': 461.927, 'weight': 0.952, 'content': [{'end': 467.869, 'text': 'And that unit that you would like to monitor for a specific target is called a metric.', 'start': 461.927, 'duration': 5.942}, {'end': 473.093, 'text': 'And metrics are what gets saved into Prometheus database component.', 'start': 468.43, 'duration': 4.663}, {'end': 478.396, 'text': 'Prometheus defines human readable text based format for these metrics.', 'start': 473.373, 'duration': 5.023}, {'end': 484.12, 'text': 'metrics entries or data has type and help attributes to increase its readability.', 'start': 478.396, 'duration': 5.724}, {'end': 488.643, 'text': 'So help is basically a description that just describe what the metrics is about.', 'start': 484.54, 'duration': 4.103}], 'summary': 'Metrics in prometheus database are defined by human-readable text-based format with type and help attributes.', 'duration': 26.716, 'max_score': 461.927, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg461927.jpg'}], 'start': 321.96, 'title': 'Prometheus monitoring and alerting', 'summary': 'Details prometheus architecture and its role in automated monitoring and alerting for devops workflows, featuring a server with a time series database, data retrieval worker, and web server api.', 'chapters': [{'end': 530.538, 'start': 321.96, 'title': 'Prometheus monitoring and alerting', 'summary': 'Explains how prometheus offers automated monitoring and alerting for modern devops workflows, detailing its architecture consisting of a server with a time series database, data retrieval worker, and web server api, which monitors various targets and metrics in a human-readable text-based format.', 'duration': 208.578, 'highlights': ['Prometheus offers automated monitoring and alerting as part of a modern DevOps workflow. Prometheus provides automated monitoring and alerting for modern DevOps workflows, offering timely alerts to fix issues caused by spikes in network load or service breakdowns.', 'Prometheus architecture consists of a server with a time series database, data retrieval worker, and web server API. The architecture of Prometheus includes a server with a time series database, a data retrieval worker, and a web server API, which together form the core components for monitoring and storing metrics data.', 'Prometheus monitors various targets and metrics in a human-readable text-based format. Prometheus monitors a wide range of targets, such as Linux servers, Windows servers, standalone Apache servers, applications, and services, capturing metrics like CPU usage, memory usage, disk space usage, number of exceptions, and request duration in a human-readable text-based format.']}], 'duration': 208.578, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg321960.jpg', 'highlights': ['Prometheus architecture includes a server with a time series database, data retrieval worker, and web server API.', 'Prometheus provides automated monitoring and alerting for modern DevOps workflows, offering timely alerts to fix issues caused by spikes in network load or service breakdowns.', 'Prometheus monitors a wide range of targets, capturing metrics like CPU usage, memory usage, disk space usage, number of exceptions, and request duration in a human-readable text-based format.']}, {'end': 983.272, 'segs': [{'end': 570.054, 'src': 'heatmap', 'start': 531.618, 'weight': 0, 'content': [{'end': 537.001, 'text': 'So now the interesting question is how does Prometheus actually collect those metrics from the targets?', 'start': 531.618, 'duration': 5.383}, {'end': 546.828, 'text': 'Prometheus pulls metrics data from the targets from an HTTP endpoint which by default is host address slash metrics.', 'start': 537.682, 'duration': 9.146}, {'end': 549.227, 'text': 'And for that to work,', 'start': 547.725, 'duration': 1.502}, {'end': 560.305, 'text': 'one targets must expose that slash metrics endpoint and two data available at slash metrics endpoint must be in the format that Prometheus understands.', 'start': 549.227, 'duration': 11.078}, {'end': 562.448, 'text': 'And we saw that example metrics before.', 'start': 560.765, 'duration': 1.683}, {'end': 570.054, 'text': "Some servers are already exposing Prometheus endpoints, so you don't need extra work to gather metrics from them.", 'start': 563.189, 'duration': 6.865}], 'summary': 'Prometheus collects metrics via http endpoint from targets, requiring specific format and endpoint exposure.', 'duration': 28.687, 'max_score': 531.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg531618.jpg'}, {'end': 607.362, 'src': 'embed', 'start': 579.56, 'weight': 2, 'content': [{'end': 586.966, 'text': 'So exporter is basically a script or a service that fetches metrics from your target and converts them in format.', 'start': 579.56, 'duration': 7.406}, {'end': 595.793, 'text': 'Prometheus understands and exposes this converted data at its own slash metrics endpoint where Prometheus can scrape them.', 'start': 587.266, 'duration': 8.527}, {'end': 607.362, 'text': 'And Prometheus has a list of exporters for different services like MySQL, Elasticsearch, Linux server, build tools, cloud platforms, and so on.', 'start': 596.413, 'duration': 10.949}], 'summary': 'Exporters fetch and convert metrics for prometheus, including mysql, elasticsearch, linux server, build tools, and cloud platforms.', 'duration': 27.802, 'max_score': 579.56, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg579560.jpg'}, {'end': 705.152, 'src': 'embed', 'start': 675.859, 'weight': 1, 'content': [{'end': 683.224, 'text': "Let's say, you want to see how many requests your application is getting at different times or how many exceptions are occurring,", 'start': 675.859, 'duration': 7.365}, {'end': 687.467, 'text': 'how many server resources your application is using, et cetera.', 'start': 683.224, 'duration': 4.243}, {'end': 694.829, 'text': 'For this use case, there are Prometheus client libraries for different languages like Node.js, Java, etc.', 'start': 688.027, 'duration': 6.802}, {'end': 696.509, 'text': 'Using these libraries,', 'start': 695.449, 'duration': 1.06}, {'end': 705.152, 'text': 'you can expose the slash metric scraping endpoint in your application and provide different metrics that are relevant for you on that endpoint.', 'start': 696.509, 'duration': 8.643}], 'summary': 'Use prometheus client libraries to monitor application metrics and expose them through a scraping endpoint.', 'duration': 29.293, 'max_score': 675.859, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg675859.jpg'}, {'end': 808.478, 'src': 'embed', 'start': 765.336, 'weight': 4, 'content': [{'end': 767.458, 'text': 'So you have monitoring, which is great,', 'start': 765.336, 'duration': 2.122}, {'end': 775.585, 'text': 'but you pay the price of overloading your infrastructure with constant push requests from all the services and thus flooding the network.', 'start': 767.458, 'duration': 8.127}, {'end': 782.73, 'text': 'Plus. you also have to install daemons on each of these targets to push the metrics to monitoring server,', 'start': 776.025, 'duration': 6.705}, {'end': 785.572, 'text': 'while Prometheus requires just a scraping endpoint.', 'start': 782.73, 'duration': 2.842}, {'end': 790.356, 'text': 'And this way, metrics can also be pulled by multiple Prometheus instances.', 'start': 786.052, 'duration': 4.304}, {'end': 797.665, 'text': 'And another advantage of that is using Paul Prometheus can easily detect whether service is up and running,', 'start': 791.016, 'duration': 6.649}, {'end': 801.59, 'text': "for example when he doesn't respond on the pole or when the endpoint isn't available.", 'start': 797.665, 'duration': 3.925}, {'end': 808.478, 'text': "While we push if the service doesn't push any data or send its health status, it might have many reasons.", 'start': 802.11, 'duration': 6.368}], 'summary': 'Prometheus simplifies monitoring with scraping, reducing infrastructure load and enabling multiple instances to pull metrics.', 'duration': 43.142, 'max_score': 765.336, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg765336.jpg'}, {'end': 931.933, 'src': 'embed', 'start': 855.652, 'weight': 6, 'content': [{'end': 863.001, 'text': 'So how does Prometheus know what to scrape and when? All that is configured in Prometheus.yaml configuration file.', 'start': 855.652, 'duration': 7.349}, {'end': 868.007, 'text': 'So you define which targets Prometheus should scrape and at what interval.', 'start': 863.361, 'duration': 4.646}, {'end': 873.133, 'text': 'Prometheus then uses a service discovery mechanism to find those target endpoints.', 'start': 868.427, 'duration': 4.706}, {'end': 880.18, 'text': 'When you first download and install Prometheus, you will see the sample config file with some default values in it.', 'start': 873.653, 'duration': 6.527}, {'end': 881.561, 'text': "Here's an example.", 'start': 880.68, 'duration': 0.881}, {'end': 888.468, 'text': 'We have global config that defines scrape interval or how often Prometheus will scrape its targets.', 'start': 881.961, 'duration': 6.507}, {'end': 891.35, 'text': 'And you can override this for individual targets.', 'start': 889.068, 'duration': 2.282}, {'end': 895.472, 'text': 'The rule files block specifies the location of any rules.', 'start': 892.111, 'duration': 3.361}, {'end': 905.996, 'text': 'We want Prometheus server to load and the rules are basically either for aggregating metrics values or creating alerts when some condition is met,', 'start': 895.892, 'duration': 10.104}, {'end': 909.877, 'text': 'like CPU usage reached 80 percent, for example.', 'start': 905.996, 'duration': 3.881}, {'end': 915.561, 'text': 'So Prometheus uses rules to create new time series entries and to generate alerts.', 'start': 910.357, 'duration': 5.204}, {'end': 923.767, 'text': 'And the evaluation interval option in global config defines how often Prometheus will evaluate these rules.', 'start': 916.142, 'duration': 7.625}, {'end': 929.912, 'text': 'And the last block, scrap configs, controls what resources Prometheus monitors.', 'start': 924.308, 'duration': 5.604}, {'end': 931.933, 'text': 'This is where you define the targets.', 'start': 930.432, 'duration': 1.501}], 'summary': 'Prometheus configuration defines scrape targets, intervals, rules, and resources.', 'duration': 76.281, 'max_score': 855.652, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg855652.jpg'}], 'start': 531.618, 'title': 'Prometheus monitoring fundamentals', 'summary': 'Covers prometheus metrics collection from http endpoints and exporters, using prometheus client libraries, and pull-based monitoring. it also discusses monitoring configuration, including scraping targets, intervals, rules, and health monitoring.', 'chapters': [{'end': 716.222, 'start': 531.618, 'title': 'Prometheus metrics collection', 'summary': 'Explains how prometheus collects metrics from targets through http endpoints and exporters, including examples of using exporters for different services and the use of prometheus client libraries for custom application monitoring.', 'duration': 184.604, 'highlights': ['Prometheus collects metrics from targets through an HTTP endpoint, usually at the host address followed by /metrics, and the data must be in a format that Prometheus understands.', 'Exporters are scripts or services that fetch metrics from targets, convert them into a format Prometheus understands, and expose the converted data at their own /metrics endpoint for Prometheus to scrape.', 'Prometheus has a variety of exporters available for different services such as MySQL, Elasticsearch, Linux server, build tools, and cloud platforms.', 'Node exporter tar file from Prometheus repository can be used to monitor a Linux server by converting its metrics and making them scrapable at its own /metrics endpoint.', 'Exporters are available as Docker images, enabling easy deployment for monitoring services like MySQL container in Kubernetes cluster.', 'Prometheus client libraries for different languages like Node.js and Java allow custom applications to expose relevant metrics through the /metrics endpoint for monitoring by the infrastructure team.']}, {'end': 829.424, 'start': 716.682, 'title': 'Prometheus: pull-based monitoring', 'summary': "Explains how prometheus's pull-based system reduces infrastructure overload by scraping metrics from endpoints, compared to the push-based systems used by other monitoring tools, which create high traffic and require daemons on each target.", 'duration': 112.742, 'highlights': ["Prometheus's pull-based system reduces infrastructure overload by scraping metrics from endpoints, unlike push-based systems used by other monitoring tools.", 'Push-based systems can create high traffic within the infrastructure and become a bottleneck for monitoring.', 'Prometheus requires just a scraping endpoint, while push systems require daemons on each target, resulting in reduced installation complexity.', "Prometheus can easily detect whether a service is up and running by pulling metrics, providing insight into the service's status and potential issues."]}, {'end': 983.272, 'start': 829.964, 'title': 'Prometheus monitoring configuration', 'summary': "Discusses the configuration of prometheus, including the use of push gateway for services to push metrics, configuration of scraping targets and intervals in the prometheus.yaml file, and the use of rules for aggregating metrics and generating alerts. it also covers the monitoring of prometheus's own health and the definition of scrape configs.", 'duration': 153.308, 'highlights': ['Prometheus offers push gateway components for services to push their metrics directly to the database, although it should be an exception due to potential issues (e.g., inconsistent metrics).', 'The configuration of scraping targets and intervals is defined in the Prometheus.yaml file, allowing for the definition of which targets to scrape and at what interval, as well as the use of service discovery mechanism.', 'The rule files block in the configuration specifies the location of rules for aggregating metrics values or creating alerts based on certain conditions (e.g., CPU usage reaching 80 percent).', 'Prometheus uses rules to create new time series entries and to generate alerts, with the evaluation interval option defining how often Prometheus will evaluate these rules.', "The scrap configs block controls the resources that Prometheus monitors, allowing the definition of targets and the monitoring of Prometheus's own health through its metrics endpoint."]}], 'duration': 451.654, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg531618.jpg', 'highlights': ['Prometheus collects metrics from targets through an HTTP endpoint, usually at the host address followed by /metrics, and the data must be in a format that Prometheus understands.', 'Prometheus client libraries for different languages like Node.js and Java allow custom applications to expose relevant metrics through the /metrics endpoint for monitoring by the infrastructure team.', 'Exporters are scripts or services that fetch metrics from targets, convert them into a format Prometheus understands, and expose the converted data at their own /metrics endpoint for Prometheus to scrape.', 'Prometheus has a variety of exporters available for different services such as MySQL, Elasticsearch, Linux server, build tools, and cloud platforms.', "Prometheus's pull-based system reduces infrastructure overload by scraping metrics from endpoints, unlike push-based systems used by other monitoring tools.", "Prometheus can easily detect whether a service is up and running by pulling metrics, providing insight into the service's status and potential issues.", 'The configuration of scraping targets and intervals is defined in the Prometheus.yaml file, allowing for the definition of which targets to scrape and at what interval, as well as the use of service discovery mechanism.', 'The rule files block in the configuration specifies the location of rules for aggregating metrics values or creating alerts based on certain conditions (e.g., CPU usage reaching 80 percent).', "The scrap configs block controls the resources that Prometheus monitors, allowing the definition of targets and the monitoring of Prometheus's own health through its metrics endpoint."]}, {'end': 1290.212, 'segs': [{'end': 1014.923, 'src': 'embed', 'start': 983.853, 'weight': 0, 'content': [{'end': 991.037, 'text': 'So the first one is how does Prometheus actually trigger the alerts that are defined by rules and who receives them?', 'start': 983.853, 'duration': 7.184}, {'end': 1000.243, 'text': 'Prometheus has a component called Alert Manager that is responsible for firing alerts via different channels.', 'start': 991.798, 'duration': 8.445}, {'end': 1002.205, 'text': 'It could be email, it could be a slack channel.', 'start': 1000.263, 'duration': 1.942}, {'end': 1005.2, 'text': 'or some other notification client.', 'start': 1003.3, 'duration': 1.9}, {'end': 1014.923, 'text': 'So Prometheus server will read the alert rules and if the condition in the rules is met, an alert gets fired through that configured channel.', 'start': 1005.781, 'duration': 9.142}], 'summary': 'Prometheus triggers alerts via alert manager, sending through various channels like email and slack.', 'duration': 31.07, 'max_score': 983.853, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg983853.jpg'}, {'end': 1070.787, 'src': 'embed', 'start': 1028.165, 'weight': 1, 'content': [{'end': 1035.108, 'text': 'Prometheus stores the metrics data on disk, so it includes a local on disk time series database,', 'start': 1028.165, 'duration': 6.943}, {'end': 1042.411, 'text': 'but also optionally integrates with remote storage system and the data is stored in a custom time series format.', 'start': 1035.108, 'duration': 7.303}, {'end': 1048.113, 'text': "And because of that, you can't write Prometheus data directly into a relational database, for example.", 'start': 1042.731, 'duration': 5.382}, {'end': 1055.996, 'text': "So once you've collected the metrics, Prometheus also lets you query the metrics data on targets through its server API.", 'start': 1048.593, 'duration': 7.403}, {'end': 1058.718, 'text': 'using PromQL query language.', 'start': 1056.636, 'duration': 2.082}, {'end': 1070.787, 'text': 'You can use Prometheus dashboard UI to ask the Prometheus server via PromQL to, for example, show the status of a particular target right now,', 'start': 1061.36, 'duration': 9.427}], 'summary': 'Prometheus stores metrics on disk and integrates with remote storage systems. it allows querying through its server api using promql.', 'duration': 42.622, 'max_score': 1028.165, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg1028165.jpg'}, {'end': 1232.492, 'src': 'embed', 'start': 1168.095, 'weight': 4, 'content': [{'end': 1175.999, 'text': 'that it is designed to be reliable even when other systems have an outage so that you can diagnose the problems and fix them.', 'start': 1168.095, 'duration': 7.904}, {'end': 1184.102, 'text': "So each Prometheus server is standalone and self containing, meaning it doesn't depend on network storage or other remote services.", 'start': 1176.399, 'duration': 7.703}, {'end': 1193.366, 'text': "It's meant to work when other parts of the infrastructure are broken and you don't need to set up extensive infrastructure to use it, which,", 'start': 1184.582, 'duration': 8.784}, {'end': 1194.707, 'text': 'of course, is a great thing.', 'start': 1193.366, 'duration': 1.341}, {'end': 1197.328, 'text': 'However, it also has this advantage.', 'start': 1195.007, 'duration': 2.321}, {'end': 1200.089, 'text': 'that Prometheus can be difficult to scale.', 'start': 1197.808, 'duration': 2.281}, {'end': 1202.47, 'text': 'So when you have hundreds of servers,', 'start': 1200.509, 'duration': 1.961}, {'end': 1215.096, 'text': 'you might want to have multiple Prometheus servers that somewhere aggregate all these metrics data and configuring that and scaling Prometheus in that way can actually be very difficult because of these characteristic.', 'start': 1202.47, 'duration': 12.626}, {'end': 1219.98, 'text': 'So, while using a single node is less complex and you can get started very easily.', 'start': 1215.516, 'duration': 4.464}, {'end': 1224.164, 'text': 'it puts a limit on the number of metrics that can be monitored by Prometheus.', 'start': 1219.98, 'duration': 4.184}, {'end': 1232.492, 'text': 'So, to work around that, you either increase the capacity of the Prometheus server so we can store more metrics data,', 'start': 1224.705, 'duration': 7.787}], 'summary': 'Prometheus is reliable, standalone, and self-containing. scaling can be difficult with hundreds of servers and a single node has limitations on the number of metrics it can monitor.', 'duration': 64.397, 'max_score': 1168.095, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg1168095.jpg'}, {'end': 1268.571, 'src': 'embed', 'start': 1248.919, 'weight': 3, 'content': [{'end': 1259.465, 'text': 'Prometheus is fully compatible with both and Prometheus components are available as Docker images and therefore can easily be deployed in Kubernetes or other container environments.', 'start': 1248.919, 'duration': 10.546}, {'end': 1268.571, 'text': 'and integrates great with Kubernetes infrastructure, providing cluster node resource monitoring out of the box, which means,', 'start': 1260.385, 'duration': 8.186}], 'summary': 'Prometheus is fully compatible with docker, easily deployable in kubernetes, and provides cluster node resource monitoring out of the box.', 'duration': 19.652, 'max_score': 1248.919, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg1248919.jpg'}], 'start': 983.853, 'title': 'Prometheus monitoring and configuration', 'summary': 'Covers prometheus alert triggering, data storage, metrics querying with promql, integration with grafana, and the challenges, advantages, and compatibility of configuring prometheus for monitoring, emphasizing practical examples and kubernetes deployment.', 'chapters': [{'end': 1124.203, 'start': 983.853, 'title': 'Prometheus alerts and data storage', 'summary': 'Discusses how prometheus triggers alerts via its alert manager and stores metrics data on disk, integrating with remote storage systems. it also covers querying metrics data using promql and visualization using grafana.', 'duration': 140.35, 'highlights': ['Prometheus triggers alerts via Alert Manager, which can send alerts through various channels like email or Slack.', 'Prometheus stores metrics data on disk and optionally integrates with remote storage systems, using a custom time series format.', 'Prometheus allows querying metrics data on targets through its server API using PromQL query language and visualizing the data using tools like Grafana.']}, {'end': 1290.212, 'start': 1124.203, 'title': 'Configuring prometheus for monitoring', 'summary': 'Explains the challenges of configuring prometheus, its advantage of reliability during outages, difficulty in scaling, and compatibility with docker and kubernetes, emphasizing the need for separate videos for practical examples and deployment on kubernetes.', 'duration': 166.009, 'highlights': ["Prometheus is designed to be reliable even during system outages and doesn't depend on network storage or remote services. Prometheus is designed to be reliable even during system outages, ensuring diagnostics and problem resolution without extensive infrastructure.", 'Scaling Prometheus can be difficult when dealing with hundreds of servers, requiring multiple servers to aggregate metrics data. Scaling Prometheus can be difficult when dealing with hundreds of servers, requiring multiple servers to aggregate metrics data, posing a challenge due to its characteristics.', 'Working with a single node limits the number of metrics that can be monitored by Prometheus, requiring capacity increase or limiting the number of collected metrics. Working with a single node limits the number of metrics that can be monitored by Prometheus, requiring capacity increase or limiting the number of collected metrics to address this limitation.', 'Prometheus is fully compatible with Docker and Kubernetes, providing cluster node resource monitoring out of the box. Prometheus is fully compatible with Docker and Kubernetes, providing cluster node resource monitoring out of the box, simplifying deployment and integration with Kubernetes infrastructure.']}], 'duration': 306.359, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/h4Sl21AKiDg/pics/h4Sl21AKiDg983853.jpg', 'highlights': ['Prometheus triggers alerts via Alert Manager, which can send alerts through various channels like email or Slack.', 'Prometheus allows querying metrics data on targets through its server API using PromQL query language and visualizing the data using tools like Grafana.', 'Prometheus stores metrics data on disk and optionally integrates with remote storage systems, using a custom time series format.', 'Prometheus is fully compatible with Docker and Kubernetes, providing cluster node resource monitoring out of the box, simplifying deployment and integration with Kubernetes infrastructure.', "Prometheus is designed to be reliable even during system outages and doesn't depend on network storage or remote services, ensuring diagnostics and problem resolution without extensive infrastructure.", 'Scaling Prometheus can be difficult when dealing with hundreds of servers, requiring multiple servers to aggregate metrics data, posing a challenge due to its characteristics.', 'Working with a single node limits the number of metrics that can be monitored by Prometheus, requiring capacity increase or limiting the number of collected metrics to address this limitation.']}], 'highlights': ['Prometheus is widely accepted and popular in containerized environments, becoming the mainstream monitoring tool.', 'Prometheus was created to monitor highly dynamic container environments like Kubernetes, Docker Swarm, etc.', 'Prometheus provides automated monitoring and alerting for modern DevOps workflows, offering timely alerts to fix issues caused by spikes in network load or service breakdowns.', 'Prometheus monitors a wide range of targets, capturing metrics like CPU usage, memory usage, disk space usage, number of exceptions, and request duration in a human-readable text-based format.', 'Prometheus collects metrics from targets through an HTTP endpoint, usually at the host address followed by /metrics, and the data must be in a format that Prometheus understands.', 'Prometheus client libraries for different languages like Node.js and Java allow custom applications to expose relevant metrics through the /metrics endpoint for monitoring by the infrastructure team.', 'Prometheus has a variety of exporters available for different services such as MySQL, Elasticsearch, Linux server, build tools, and cloud platforms.', "Prometheus's pull-based system reduces infrastructure overload by scraping metrics from endpoints, unlike push-based systems used by other monitoring tools.", "Prometheus can easily detect whether a service is up and running by pulling metrics, providing insight into the service's status and potential issues.", 'Prometheus triggers alerts via Alert Manager, which can send alerts through various channels like email or Slack.', 'Prometheus allows querying metrics data on targets through its server API using PromQL query language and visualizing the data using tools like Grafana.', 'Prometheus stores metrics data on disk and optionally integrates with remote storage systems, using a custom time series format.', 'Prometheus is fully compatible with Docker and Kubernetes, providing cluster node resource monitoring out of the box, simplifying deployment and integration with Kubernetes infrastructure.', "Prometheus is designed to be reliable even during system outages and doesn't depend on network storage or remote services, ensuring diagnostics and problem resolution without extensive infrastructure."]}