diff --git a/CHANGES.md b/CHANGES.md index 595bd51ea9c7..4d952d3263a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -55,15 +55,18 @@ Release Notes. * Add Guava EventBus component ID(123) of Java agent. * Add OpenFunction component ID(5013). * Expose configuration `responseTimeout` of ES client. +* Support datasource metric analysis. #### UI * Remove unused jars (log4j-api.jar) in classpath. * Bump up netty version to fix CVE. +* add Database Connection pool metric. #### Documentation * update backend-alarm.md doc, support op "=" to "==". +* update backend-meter.md doc . All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/112?closed=1) diff --git a/docs/en/setup/backend/backend-meter.md b/docs/en/setup/backend/backend-meter.md index e285002a1eb8..032e41b8494b 100644 --- a/docs/en/setup/backend/backend-meter.md +++ b/docs/en/setup/backend/backend-meter.md @@ -70,9 +70,10 @@ All available meter analysis scripts could be found [here](../../../../oap-serve | Rule Name | Description | Configuration File | Data Source | |-----|-----|-----|-----| -|spring-sleuth| Metrics of Spring Sleuth Application | meter-analyzer-config/spring-sleuth.yaml | Sprign Sleuth Application --meter format--> SkyWalking OAP Server | |satellite| Metrics of SkyWalking Satellite self-observability(so11y)| meter-analyzer-config/satellite.yaml| SkyWalking Satellite --meter format-->SkyWalking OAP Server| |threadpool| Metrics of Thread Pool | meter-analyzer-config/threadpool.yaml | Thread Pool --meter format--> SkyWalking OAP Server | +|datasource| Metrics of DataSource metrics | meter-analyzer-config/datasource.yaml | Datasource --meter format--> SkyWalking OAP Server | +|spring-sleuth| Metrics of Spring Sleuth Application | meter-analyzer-config/spring-sleuth.yaml | Sprign Sleuth Application --meter format--> SkyWalking OAP Server | An example can be found [here](../../../../oap-server/server-starter/src/main/resources/meter-analyzer-config/spring-sleuth.yaml). If you're using Spring Sleuth, see [Spring Sleuth Setup](spring-sleuth-setup.md). diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index ff3a62fd4fd1..51d324b70d06 100755 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -273,7 +273,7 @@ agent-analyzer: # Nginx and Envoy agents can't get the real remote address. # Exit spans with the component in the list would not generate the client-side instance relation metrics. noUpstreamRealAddressAgents: ${SW_NO_UPSTREAM_REAL_ADDRESS:6000,9000} - meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:threadpool} # Which files could be meter analyzed, files split by "," + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool} # Which files could be meter analyzed, files split by "," log-analyzer: selector: ${SW_LOG_ANALYZER:default} diff --git a/oap-server/server-starter/src/main/resources/meter-analyzer-config/datasource.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/datasource.yaml new file mode 100644 index 000000000000..411279a870f8 --- /dev/null +++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/datasource.yaml @@ -0,0 +1,20 @@ +# 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. + +expSuffix: instance(['service'], ['instance'], Layer.GENERAL) +metricPrefix: meter +metricsRules: + - name: datasource + exp: datasource.sum(['service', 'instance', 'name', 'status']) diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml index 1dd50a2bdf41..6c08220186bc 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml @@ -506,6 +506,17 @@ templates: "queryMetricType": "readMetricsValues", "chartType": "ChartLine", "metricName": "instance_clr_available_completion_port_threads,instance_clr_available_worker_threads,instance_clr_max_completion_port_threads,instance_clr_max_worker_threads" + }, + { + "width": "3", + "title": "Database Connection Pool", + "height": "250", + "entityType": "ServiceInstance", + "independentSelector": false, + "metricType": "LABELED_VALUE", + "metricName": "meter_datasource", + "queryMetricType": "readLabeledMetricsValues", + "chartType": "ChartLine" } ] },