Setup alert based on String output
This is not something Prometheus has a specific thing for. You would have to write your own exporter to create some kind of metrics (i.e. numeric) output that represents the info you care about, and then write alert rules based on that. Overall, you're probably barking up the wrong tree.