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