Can blackbox exporter monitor time that webpage redirect after login

34 views
Skip to first unread message

Dương Hưng

unread,
Mar 3, 2025, 2:21:52 AM3/3/25
to Prometheus Users
Can anyone help me in this situation:
I have a webpage https://example.com/login
Then I enter username/password and this webpage redirect to https://example.com/loginSuccess or https://example.com/loginFailed.

And I want to monitor that redirect time by blackbox exporter and visualize with grafana.

Thanks

Brian Candler

unread,
Mar 3, 2025, 3:16:16 AM3/3/25
to Prometheus Users
Depends what you mean by "login". Is it filling in a form and POSTing it? HTTP Basic Auth? Javascript magic? Something else?

If it's filling in a form, then you should be able to provide the form content using "method: POST" and "body:" attributes of the http_probe. You can check that you get a redirect status (e.g. 302) using "valid_status_codes", and it will measure the response time.

You'll have to ensure the body is correctly formatted/encoded, and will probably have to set headers like "Content-Type: application/x-www-form-urlencoded". You can probably capture what you need by logging in while your browser's developer console is open.
Reply all
Reply to author
Forward
0 new messages