github.com/google/cloudprober@v0.11.3/examples/file_based_targets/cloudprober.cfg (about)

     1  # This config demonstrates the use of file based targets.
     2  #
     3  # Probes in this config use targets defined in the "targets.textpb" file.
     4  # targets.textpb lists targets in the RDS resource format.  You "don't" need to
     5  # restart cloudprober after updating the targets file; cloudprober will
     6  # automatically reload the file at the given interval (re_eval_sec).
     7  #
     8  # cloudprober --config_file=cloudprober.cfg
     9  #
    10  # Probe results will look like the following:
    11  #
    12  # total{ptype="http",probe="all-endpoints",dst="web-aa-01",cluster="aa"} 20
    13  # total{ptype="http",probe="all-endpoints",dst="web-aa-02",cluster="aa"} 20
    14  # total{ptype="http",probe="all-endpoints",dst="web-bb-01",cluster="bb"} 20
    15  # total{ptype="http",probe="dc-aa-endpoints",dst="web-aa-01"} 20
    16  # total{ptype="http",probe="dc-aa-endpoints",dst="web-aa-02"} 20
    17  
    18  probe {
    19      name: "all-endpoints"
    20      type: HTTP
    21  
    22      additional_label {
    23          key: "cluster"
    24          value: "@target.label.dc@"
    25      }
    26  
    27      targets {
    28          file_targets {
    29              file_path: "targets.textpb"
    30              re_eval_sec: 300
    31          }
    32      }
    33  }
    34  
    35  probe {
    36      name: "dc-aa-endpoints"
    37      type: HTTP
    38  
    39      targets {
    40          file_targets {
    41              file_path: "targets.textpb"
    42              filter {
    43                  key: "labels.dc"
    44                  value: "aa"
    45              }
    46              re_eval_sec: 300
    47          }
    48      }
    49  }