Alloy monitor url with blackbox & push
Jump to navigation
Jump to search
prometheus.exporter.blackbox "cisco_probe" { config = "{ modules: { http_2xx: { prober: http, http: { follow_redirects: true, preferred_ip_protocol: ip4 } } } }" } prometheus.scrape "cisco_url_check" { targets = [ {"__address__" = prometheus.exporter.blackbox.cisco_probe.targets[0].__address__, "target" = "https://cisco.com"} ] job_name = "internet_url_accessibility" metrics_path = "/probe" params = { module = ["http_2xx"] } relabel_configs { source_labels = ["target"] target_label = "instance" } forward_to = [prometheus.remote_write.mimir_example.receiver] } prometheus.remote_write "mimir_example" { endpoint { url = "http://mimir.example.com/api/v1/push" // Replace with your actual Mimir endpoint } }