Creating a Grafana alert from a Prometheus metric turns a PromQL expression into a scheduled rule that Grafana can evaluate and route to a contact point. Teams use these rules when an existing dashboard metric should also page, message, or notify someone when the measured condition changes.
Grafana-managed alert rules run the query through the selected Grafana data source, reduce the returned series to a threshold condition, and store the rule in a folder and evaluation group. The Prometheus data source must already be connected, and the account creating the alert needs permission to save rules in the target folder.
A target-down rule can use 1 - up{job="prometheus"} with a threshold above 0. The rule previews as Normal while up equals 1, and it can fire after the pending period when the expression returns a value above 0.

1 - up{job="prometheus"}
Replace job="prometheus" with labels that match the service or target being monitored. The expression should return one numeric value per alert instance.
The target-down expression returns 0 while the scrape target is up, so the preview should show Normal when the target is reachable.
All rules in an evaluation group run on the group interval. Use a shorter interval for fast detection and a longer interval when the query is expensive.
Use the default notification mode to route this rule directly to a contact point. Enable Advanced options only when labels should route through notification policies.
