You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/03/30 12:48:01 UTC

[skywalking] branch master updated: Support collecting memory buff/cache metrics in VM monitoring. (#10621)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 13c093faf9 Support collecting memory buff/cache metrics in VM monitoring. (#10621)
13c093faf9 is described below

commit 13c093faf904c547084d0cfac519aaf04f30d76d
Author: innerpeacez <in...@gmail.com>
AuthorDate: Thu Mar 30 20:47:54 2023 +0800

    Support collecting memory buff/cache metrics in VM monitoring. (#10621)
---
 docs/en/changes/changes.md                                         | 1 +
 docs/en/setup/backend/backend-vm-monitoring.md                     | 2 +-
 oap-server/server-starter/src/main/resources/otel-rules/vm.yaml    | 2 ++
 .../resources/ui-initialized-templates/os_linux/linux-service.json | 7 ++++++-
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 3b3f036f0d..c8b14dc984 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -24,6 +24,7 @@
 * Support alarm metric OP `!=`.
 * Support metrics query indicates whether value == 0 represents actually zero or no data.
 * Fix `NPE` when query the not exist series indexes in ElasticSearch storage. 
+* Support collecting memory buff/cache metrics in VM monitoring.
 
 #### UI
 * Revert: cpm5d function. This feature is cancelled from backend.
diff --git a/docs/en/setup/backend/backend-vm-monitoring.md b/docs/en/setup/backend/backend-vm-monitoring.md
index 9edf8d1413..2e9c716537 100644
--- a/docs/en/setup/backend/backend-vm-monitoring.md
+++ b/docs/en/setup/backend/backend-vm-monitoring.md
@@ -40,7 +40,7 @@ VM entity as a `Service` in OAP and on the `Layer: OS_LINUX`.
 | Memory Swap Usage            | %    | meter_vm_memory_swap_percentage                                                                                         | The percentage usage of swap memory                                                            | Prometheus node-exporter<br />Telegraf input plugin |
 | CPU Average Used             | %    | meter_vm_cpu_average_used                                                                                               | The percentage usage of the CPU core in each mode                                              | Prometheus node-exporter<br />Telegraf input plugin |
 | CPU Load                     |      | meter_vm_cpu_load1<br />meter_vm_cpu_load5<br />meter_vm_cpu_load15                                                     | The CPU 1m / 5m / 15m average load                                                             | Prometheus node-exporter<br />Telegraf input plugin |
-| Memory RAM                   | MB   | meter_vm_memory_total<br />meter_vm_memory_available<br />meter_vm_memory_used                                          | The RAM statistics, including Total / Available / Used                                         | Prometheus node-exporter<br />Telegraf input plugin |
+| Memory RAM                   | MB   | meter_vm_memory_total<br />meter_vm_memory_available<br />meter_vm_memory_used />meter_vm_memory_buff_cache             | The RAM statistics, including Total / Available / Used / Buff-Cache                            | Prometheus node-exporter<br />Telegraf input plugin |
 | Memory Swap                  | MB   | meter_vm_memory_swap_free<br />meter_vm_memory_swap_total                                                               | Swap memory statistics, including Free / Total                                                 | Prometheus node-exporter<br />Telegraf input plugin |
 | File System Mountpoint Usage | %    | meter_vm_filesystem_percentage                                                                                          | The percentage usage of the file system at each mount point                                    | Prometheus node-exporter<br />Telegraf input plugin |
 | Disk R/W                     | KB/s | meter_vm_disk_read,meter_vm_disk_written                                                                                | The disk read and written                                                                      | Prometheus node-exporter<br />Telegraf input plugin |
diff --git a/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml b/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml
index 74b23ba7a3..4937251af5 100644
--- a/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml
+++ b/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml
@@ -52,6 +52,8 @@ metricsRules:
     exp: node_memory_MemAvailable_bytes
   - name: memory_used
     exp: node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes
+  - name: memory_buff_cache
+    exp: node_memory_Buffers_bytes + node_memory_Cached_bytes
   - name: memory_swap_free
     exp: node_memory_SwapFree_bytes
   - name: memory_swap_total
diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
index dc2d9f7c27..2bcd91adc7 100644
--- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
+++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
@@ -208,9 +208,11 @@
           "metrics": [
             "meter_vm_memory_used",
             "meter_vm_memory_total",
-            "meter_vm_memory_available"
+            "meter_vm_memory_available",
+            "meter_vm_memory_buff_cache"
           ],
           "metricTypes": [
+            "readMetricsValues",
             "readMetricsValues",
             "readMetricsValues",
             "readMetricsValues"
@@ -223,6 +225,9 @@
             {
               "calculation": "byteToMB"
             },
+            {
+              "calculation": "byteToMB"
+            },
             {
               "calculation": "byteToMB"
             }