github.com/google/cloudprober@v0.11.3/probes/proto/config.proto (about) 1 syntax = "proto2"; 2 3 package cloudprober.probes; 4 5 import "github.com/google/cloudprober/metrics/proto/dist.proto"; 6 import "github.com/google/cloudprober/probes/dns/proto/config.proto"; 7 import "github.com/google/cloudprober/probes/external/proto/config.proto"; 8 import "github.com/google/cloudprober/probes/grpc/proto/config.proto"; 9 import "github.com/google/cloudprober/probes/http/proto/config.proto"; 10 import "github.com/google/cloudprober/probes/ping/proto/config.proto"; 11 import "github.com/google/cloudprober/probes/udp/proto/config.proto"; 12 import "github.com/google/cloudprober/probes/udplistener/proto/config.proto"; 13 import "github.com/google/cloudprober/targets/proto/targets.proto"; 14 import "github.com/google/cloudprober/validators/proto/config.proto"; 15 16 option go_package = "github.com/google/cloudprober/probes/proto"; 17 18 message ProbeDef { 19 required string name = 1; 20 21 enum Type { 22 PING = 0; 23 HTTP = 1; 24 DNS = 2; 25 EXTERNAL = 3; 26 UDP = 4; 27 UDP_LISTENER = 5; 28 GRPC = 6; 29 30 // One of the extension probe types. See "extensions" below for more 31 // details. 32 EXTENSION = 98; 33 34 // USER_DEFINED probe type is for a one off probe that you want to compile 35 // into cloudprober, but you don't expect it to be reused. If you expect 36 // it to be reused, you should consider adding it using the extensions 37 // mechanism. 38 USER_DEFINED = 99; 39 } 40 required Type type = 2; 41 42 // Which machines this probe should run on. If defined, cloudprober will run 43 // this probe only if machine's hostname matches this value. 44 optional string run_on = 3; 45 46 // Interval between two probes 47 optional int32 interval_msec = 4 [default = 2000]; 48 49 // Timeout for each probe 50 optional int32 timeout_msec = 5 [default = 1000]; 51 52 // Targets for the probe 53 required targets.TargetsDef targets = 6; 54 55 // Latency distribution. If specified, latency is stored as a distribution. 56 optional metrics.Dist latency_distribution = 7; 57 58 // Latency unit. Any string that's parseable by time.ParseDuration. 59 // Valid values: "ns", "us" (or "µs"), "ms", "s", "m", "h". 60 optional string latency_unit = 8 [default = "us"]; 61 62 // Validators are in experimental phase right now and can change at any time. 63 // NOTE: Only PING, HTTP and DNS probes support validators. 64 repeated validators.Validator validator = 9; 65 66 // Set the source IP to send packets from, either by providing an IP address 67 // directly, or a network interface. 68 oneof source_ip_config { 69 string source_ip = 10; 70 string source_interface = 11; 71 } 72 73 // IP version to use for networking probes. If specified, this is used at the 74 // time of resolving a target, picking the correct IP for the source IP if 75 // source_interface option is provided, and to craft the packet correctly 76 // for PING probes. 77 // 78 // If ip_version is not configured but source_ip is provided, we get 79 // ip_version from it. If both are confgiured, an error is returned if there 80 // is a conflict between the two. 81 // 82 // If left unspecified and both addresses are available in resolve call or on 83 // source interface, IPv4 is preferred. 84 // Future work: provide an option to prefer IPv4 and IPv6 explicitly. 85 enum IPVersion { 86 IP_VERSION_UNSPECIFIED = 0; 87 IPV4 = 1; 88 IPV6 = 2; 89 } 90 optional IPVersion ip_version = 12; 91 92 // How often to export stats. Probes usually run at a higher frequency (e.g. 93 // every second); stats from individual probes are aggregated within 94 // cloudprober until exported. In most cases, users don't need to change the 95 // default. 96 // 97 // By default this field is set in the following way: 98 // For all probes except UDP: 99 // stats_export_interval=max(interval, 10s) 100 // For UDP: 101 // stats_export_interval=max(2*max(interval, timeout), 10s) 102 optional int32 stats_export_interval_msec = 13; 103 104 // Additional labels to add to the probe results. Label's value can either be 105 // static or can be derived from target's labels. 106 // 107 // Example: 108 // additional_label { 109 // key: "src_zone" 110 // value: "{{.zone}}" 111 // } 112 // additional_label { 113 // key: "app" 114 // value: "@target.label.app@" 115 // } 116 repeated AdditionalLabel additional_label = 14; 117 118 oneof probe { 119 ping.ProbeConf ping_probe = 20; 120 http.ProbeConf http_probe = 21; 121 dns.ProbeConf dns_probe = 22; 122 external.ProbeConf external_probe = 23; 123 udp.ProbeConf udp_probe = 24; 124 udplistener.ProbeConf udp_listener_probe = 25; 125 grpc.ProbeConf grpc_probe = 26; 126 // This field's contents are passed on to the user defined probe, registered 127 // for this probe's name through probes.RegisterUserDefined(). 128 string user_defined_probe = 99; 129 } 130 131 optional DebugOptions debug_options = 100; 132 133 // Extensions allow users to to add new probe types (for example, a probe type 134 // that utilizes a custom protocol) in a systematic manner. 135 extensions 200 to max; 136 } 137 138 message AdditionalLabel { 139 required string key = 1; 140 141 // Value can either be a static value or can be derived from target's labels. 142 // To get value from target's labels, use target.labels.<target's label key> 143 // as value. 144 required string value = 2; 145 } 146 147 message DebugOptions { 148 // Whether to log metrics or not. 149 optional bool log_metrics = 1; 150 }