We created the last piece of the chain. Jenkins job will scale nodes of a cluster only if something triggers it. We did that manually by sending POST requests but, as you might have guessed, that is not our ultimate goal. We need to run those builds through alerts based on metrics. Therefore, we'll move back to the beginning of the chain and explore some of the metrics we can use and try to convert them into meaningful alerts.
Let's open Prometheus and try to define an alert worthy of our scaling needs.
open "http://$CLUSTER_DNS/monitor"
Please use admin as both the User Name and the Password if you're asked to authenticate.
We'll start with an expression we already used in the previous chapters.
Please type the query that follows in the Expression field, click the Execute button, and switch to the Graph tab.
(sum...