![prometheus blackbox exporter prometheus blackbox exporter](https://www.server-world.info/Ubuntu_20.04/prometheus/img/10.png)
We can make PromQL queries for this data to get metrics for a specific target. Prometheus server scrapes targets over an interval to collect metrics and store them in time-series database. It can be a single target or multiple targets monitored for different metrics like CPU usage, memory usage etc. It helps monitor servers which are called targets. Prometheus has a main central component named Prometheus Server. It supports Prom query language for the searching of metrics. Prometheus is an open source monitoring tool based on the pull-based mechanism which helps in scraping data, query it, create a dashboard using it and provide alerts based on alert rules.
![prometheus blackbox exporter prometheus blackbox exporter](http://www.idcsec.com/img/20181028004809.png)
Let’s summarize why we need to do monitoring: Fix the error and make sure everything is normal afterwards.Debug log files to pinpoint error logs in that time frame.Look at graphs to identify error time frame.
![prometheus blackbox exporter prometheus blackbox exporter](https://rtfm.co.ua/wp-content/uploads/2018/07/Screenshot_20180726_121857.png)
Get alert for some error or looking at error graphs to know something is wrong.Let’s see how we fix an issue with monitoring: When we get alert we know what’s breaking which indicate symptom, then looking at further data helps find the cause which eventually helps fix the issue. This helps query error rate, request duration, latency etc. Monitoring includes collecting, processing, aggregating and displaying data about a system along with alerting based on that data. Monitoring allows us to identify long-term trends, analyze performance and see visualizations. We want to continuously monitor our instances and services for any kind of anomaly in behavior, CPU usage, memory usage, disk space, network usage, etc. It notifies if any CPU or memory usage goes up for a certain time. It helps to debug, and gain insight of the issues. Monitoring helps knowing when things go wrong. To prevent this, we need to set up monitoring as part of the deployment process. What is your worst nightmare? For me, it is when our customer visits social media and tells us that our service is down and we are not aware of it. “turned on flat screen monitor” by Chris Liverani on Unsplash