github.com/google/cloudprober@v0.11.3/cmd/cloudprober_test.cfg (about)

     1  {{with $shards := mkSlice "00" "01"}}
     2  {{range $_, $shard := $shards}}
     3  probe {
     4    type: PING
     5    name: "vm-to-google-{{$shard}}"
     6    targets {
     7      host_names: "8.8.8.8,8.8.4.4,www.google.com"
     8    }
     9    ping_probe {
    10      use_datagram_socket: true
    11    }
    12  }
    13  {{end}}
    14  {{end}}
    15  
    16  {{ $shard := "ig-us-east1-a-02-afgx" | extractSubstring "[^-]+-[^-]+-[^-]+-[^-]+-([^-]+)-.*" 1 }}
    17  {{ $targets := printf "^ig.*-([^-]+-[^-]+-[^-]+)-%s-[^-]+$" $shard }}
    18  
    19  probe {
    20    type: PING
    21    name: "vm-to-vm-{{$shard}}"
    22    targets {
    23      gce_targets {
    24        project: "google.com:bbmc-testing-prod"
    25        instances {}
    26      }
    27      regex: "{{$targets}}"
    28    }
    29    ping_probe {}
    30  }
    31  
    32  probe {
    33    type: HTTP
    34    name: "vm-to-google-http-{{$shard}}"
    35    targets {
    36      host_names: "www.google.com,{{.hostname}}"
    37    }
    38    http_probe {
    39      protocol: HTTP
    40      relative_url: "/healthz"
    41    }
    42  }
    43  
    44  
    45  probe {
    46    type: DNS
    47    name: "vm-to-public-dns"
    48    targets {
    49      host_names: "8.8.8.8"
    50    }
    51    dns_probe {
    52      resolved_domain: "www.google.com."
    53    }
    54  }