github.com/google/cloudprober@v0.11.3/surfacers/proto/config.proto (about) 1 syntax = "proto2"; 2 3 package cloudprober.surfacer; 4 5 import "github.com/google/cloudprober/surfacers/cloudwatch/proto/config.proto"; 6 import "github.com/google/cloudprober/surfacers/datadog/proto/config.proto"; 7 import "github.com/google/cloudprober/surfacers/file/proto/config.proto"; 8 import "github.com/google/cloudprober/surfacers/postgres/proto/config.proto"; 9 import "github.com/google/cloudprober/surfacers/prometheus/proto/config.proto"; 10 import "github.com/google/cloudprober/surfacers/pubsub/proto/config.proto"; 11 import "github.com/google/cloudprober/surfacers/stackdriver/proto/config.proto"; 12 13 option go_package = "github.com/google/cloudprober/surfacers/proto"; 14 15 // Enumeration for each type of surfacer we can parse and create 16 enum Type { 17 NONE = 0; 18 PROMETHEUS = 1; 19 STACKDRIVER = 2; 20 FILE = 3; 21 POSTGRES = 4; 22 PUBSUB = 5; 23 CLOUDWATCH = 6; // Experimental mode. 24 DATADOG = 7; // Experimental mode. 25 USER_DEFINED = 99; 26 } 27 28 message LabelFilter { 29 optional string key = 1; 30 optional string value = 2; 31 } 32 33 message SurfacerDef { 34 // This name is used for logging. If not defined, it's derived from the type. 35 // Note that this field is required for the USER_DEFINED surfacer type and 36 // should match with the name that you used while registering the user defined 37 // surfacer. 38 optional string name = 1; 39 40 optional Type type = 2; 41 42 // How many metrics entries (EventMetrics) to buffer. This is the buffer 43 // between incoming metrics and the metrics that are being processed. Default 44 // value should work in most cases. You may need to increase it on a busy 45 // system, but that's usually a sign that you metrics processing pipeline is 46 // slow for some reason, e.g. slow writes to a remote file. 47 // Note: Only file and pubsub surfacer supports this option right now. 48 optional int64 metrics_buffer_size = 3 [default = 10000]; 49 50 // If specified, only allow metrics that match any of these label filters. 51 // Example: 52 // allow_metrics_with_label { 53 // key: "probe", 54 // value: "check_homepage", 55 // } 56 repeated LabelFilter allow_metrics_with_label = 4; 57 58 // Ignore metrics that match any of these label filters. Ignore has precedence 59 // over allow filters. 60 // Example: 61 // ignore_metrics_with_label { 62 // key: "probe", 63 // value: "sysvars", 64 // } 65 repeated LabelFilter ignore_metrics_with_label = 5; 66 67 // Allow and ignore metrics based on their names. You can specify regexes 68 // here. Ignore has precendence over allow. 69 // Examples: 70 // ignore_metrics_with_name: "validation_failure" 71 // allow_metrics_with_name: "(total|success|latency)" 72 // 73 // For efficiency reasons, filtering by metric name has to be implemented by 74 // individual surfacers (while going through metrics within an EventMetrics). 75 // Currently following surfacers implement it: 76 // CLOUDWATCH, PROMETHEUS, STACKDRIVER 77 optional string allow_metrics_with_name = 6; 78 optional string ignore_metrics_with_name = 7; 79 80 // Whether to add failure metric or not. For stackdriver surfacer, we add 81 // failure metric by default. 82 optional bool add_failure_metric = 8; 83 84 // If set to true, cloudprober will export all metrics as gauge metrics. Note 85 // that cloudprober inherently generates only cumulative metrics. To create 86 // gauge metrics from cumulative metrics, we keep a copy of the old metrics 87 // and subtract new metrics from the previous metrics. This transformation in 88 // metrics has an increased memory-overhead because extra copies required. 89 // However, it should not be noticeable unless you're producing large number 90 // of metrics (say > 10000 metrics per second). 91 optional bool export_as_gauge = 9; 92 93 // Matching surfacer specific configuration (one for each type in the above 94 // enum) 95 oneof surfacer { 96 prometheus.SurfacerConf prometheus_surfacer = 10; 97 stackdriver.SurfacerConf stackdriver_surfacer = 11; 98 file.SurfacerConf file_surfacer = 12; 99 postgres.SurfacerConf postgres_surfacer = 13; 100 pubsub.SurfacerConf pubsub_surfacer = 14; 101 cloudwatch.SurfacerConf cloudwatch_surfacer = 15; 102 datadog.SurfacerConf datadog_surfacer = 16; 103 } 104 }