This diagram illustrates the architecture of Prometheus and some of its ecosystem components:
Configured applications metrics are used for scraping Prometheus either through direct or through intermediary gateway push. In simple words we can say that prometheus export the metrics of your application at a specific provided endpoint and it can also generate graph on the basis of data of your application exported by Prometheus.
Later on it is added as a data source in grafana and in grafana dashboard the application graph can be created and alerts are created in it. Those alerts are created in a notification channel few examples of notification channels that it supports are pager duty, slack etc.
PromQL is a query language used for Prometheus monitoring system. It is designed for building powerful yet simple queries for graphs based on time-series.
Below is the screenshot of a promql query of node-exporter.
To install prometheus proceed to the installation section of prometheus.
The alert manager will check for alerts and will monitor metrics endpoint and if it founds that application is down then it shows alerts for that.
Now whenever our application will go down it will send us the alerts to our notification channels like pager duty, slack etc.