Yes: increment a counter whenever there's a failed login. Scrape that counter from prometheus.
You can either instrument your web application directly with one of the many prometheus client libraries out there; or you can use statsd_exporter which will maintain the counters for you (and you send it a message to increment a counter)
It's probably a good idea to have a second counter for successful logins too, then you can take the ratio of the two to get the percentage success.