Dmitry
Dmitry

Reputation: 303

How to monitor web scenarios using Prometheus

I have a web application which consists of multiple pages and requires authentication using a web form.

  1. I would like to make sure that the application is working, it is not enough to just check the login page, I need to make sure that several pages are properly loading as part of one check and that this whole scenario doesn't take more than X amount of seconds.
  2. Also I would need to check SSL certificate used for that web application.

I'm trying to figure out if Prometheus has any possibility to do these 2 tasks? I saw that it has a Blackbox exporter, but it looks like it can only make a "one-off" calls towards targets and support only basic authentication. But that is not exactly what I'm looking for.

In tools like Zabbix or Site24x7 I could create a "web scenario" where I would records steps which the monitoring tool need to execute as part of the check. For example: open login page, type username and password, then click on a link on then click on a button and check that the result has expected keyword. And the results are presented as a graph with timings of execution of each step of the scenario.

What is the best practice for monitoring of web applications using Prometheus?

Thank you :)

Upvotes: 4

Views: 1614

Answers (1)

Stephen Ostermiller
Stephen Ostermiller

Reputation: 25494

Prometheus is a metrics visualization and alerting tool. It passively observes what is happening on your website but it doesn't actively hit your website itself. It relies on the existing active traffic on your website to create visualizations and alerts.

In other words you could use it to answer and alert on questions like:

  • Have there been hits to my important pages recently?
  • Are there excessive error statuses right now?
  • Are users seeing slow loading pages?

However, Prometheus would not send requests to your website to generate this data. Rather it relies on metrics published by your web server for all traffic. Prometheus is a tool for scraping the metric data from your web server, aggregating it, and reporting on it.

Upvotes: 3

Related Questions