This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/skywalking-data-collect-protocol.git
The following commit(s) were added to refs/heads/master by this push:
new 4371b5f Add alarm baseline protocol (#104)
4371b5f is described below
commit 4371b5f95f138ff6fd4b595d5351cbb84f13660a
Author: mrproliu <[email protected]>
AuthorDate: Fri Jan 17 15:37:15 2025 +0800
Add alarm baseline protocol (#104)
---
alarm/baseline.proto | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/alarm/baseline.proto b/alarm/baseline.proto
new file mode 100644
index 0000000..670425e
--- /dev/null
+++ b/alarm/baseline.proto
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+syntax = "proto3";
+package skywalking.v3;
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.alarm.baseline.v3";
+option csharp_namespace = "SkyWalking.AlarmBaseline.V3";
+option go_package =
"skywalking.apache.org/repo/goapi/collect/alarm/baseline/v3";
+
+service AlarmBaselineService {
+ // Query the predicted metrics of the given service.
+ rpc queryPredictedMetrics(AlarmBaselineRequest) returns
(AlarmBaselineResponse);
+}
+
+// The request of the predicted metrics query.
+message AlarmBaselineRequest {
+ // The request service metrics names.
+ repeated AlarmBaselineServiceMetricName serviceMetricNames = 1;
+ // The request start TimeBucket.
+ int64 startTimeBucket = 2;
+ // The request end TimeBucket.
+ int64 endTimeBucket = 3;
+ // The step of the TimeBucket.
+ TimeBucketStep step = 4;
+}
+
+enum TimeBucketStep {
+ HOUR = 0;
+}
+
+message AlarmBaselineServiceMetricName {
+ // The service name.
+ string serviceName = 1;
+ // The metrics names.
+ repeated string metricNames = 2;
+}
+
+// The response of the predicted metrics query.
+message AlarmBaselineResponse {
+ repeated AlarmBaselineServiceMetric serviceMetrics = 1;
+}
+
+message AlarmBaselineServiceMetric {
+ // The service name.
+ string serviceName = 1;
+ // The service metrics.
+ repeated AlarmBaselineMetricPrediction predictions = 2;
+}
+
+// The predicted metric.
+message AlarmBaselineMetricPrediction {
+ // The metric name.
+ string name = 1;
+ // The metric predicated values(timeBucket with predicted value).
+ repeated AlarmBaselinePredicatedValue values = 2;
+}
+
+// The predicted metric sample.
+message AlarmBaselinePredicatedValue {
+ int64 timeBucket = 1;
+ oneof value {
+ AlarmBaselineSingleValue singleValue = 2;
+ AlarmBaselineLabeledValue labeledValue = 3;
+ }
+}
+
+message AlarmBaselineValue {
+ // The predicted value.
+ int64 value = 1;
+ // The upper value of the predicted range.
+ int64 upperValue = 2;
+ // The lower value of the predicted range.
+ int64 lowerValue = 3;
+}
+
+// The predicted single value metric.
+message AlarmBaselineSingleValue {
+ AlarmBaselineValue value = 2;
+}
+
+// The predicted labeled value metric.
+message AlarmBaselineLabeledValue {
+ // label pairs with value.
+ message LabelWithValue {
+ repeated KeyStringValuePair labels = 1;
+ AlarmBaselineValue value = 2;
+ }
+ repeated LabelWithValue values = 1;
+}
+
+message KeyStringValuePair {
+ string key = 1;
+ string value = 2;
+}