github.com/google/cloudprober@v0.11.3/probes/external/proto/config.proto (about)

     1  syntax = "proto2";
     2  
     3  package cloudprober.probes.external;
     4  
     5  import "github.com/google/cloudprober/metrics/payload/proto/config.proto";
     6  
     7  option go_package = "github.com/google/cloudprober/probes/external/proto";
     8  
     9  message ProbeConf {
    10    // External probes support two mode: ONCE and SERVER. In ONCE mode, external
    11    // command is re-executed for each probe run, while in SERVER mode, command
    12    // is run in server mode, re-executed only if not running already.
    13    enum Mode {
    14      ONCE = 0;
    15      SERVER = 1;
    16    }
    17    optional Mode mode = 1 [default = ONCE];
    18  
    19    // Command.  For ONCE probes, arguments are processed for the following field
    20    // substitutions:
    21    // @probe@    Name of the probe
    22    // @target@   Hostname of the target
    23    // @address@  IP address of the target
    24    //
    25    // For example, for target ig-us-central1-a, /tools/recreate_vm -vm @target@
    26    // will get converted to: /tools/recreate_vm -vm ig-us-central1-a
    27    required string command = 2;
    28  
    29    // Options for the SERVER mode probe requests. These options are passed on to
    30    // the external probe server as part of the ProbeRequest. Values are
    31    // substituted similar to command arguments for the ONCE mode probes.
    32    message Option {
    33      optional string name = 1;
    34      optional string value = 2;
    35    }
    36    repeated Option options = 3;
    37  
    38    // Export output as metrics, where output is the output returned by the
    39    // external probe process, over stdout for ONCE probes, and through ProbeReply
    40    // for SERVER probes. Cloudprober expects variables to be in the following
    41    // format in the output:
    42    // var1 value1 (for example: total_errors 589)
    43    optional bool output_as_metrics = 4 [default = true];
    44    optional metrics.payload.OutputMetricsOptions output_metrics_options = 5;
    45  }