Skip to content

Commit

Permalink
Rename Windows Metrics(swap -> virtual memory) (#12107)
Browse files Browse the repository at this point in the history
* Fix/Change Windows metrics name(Swap -> Virtual Memory)
  - `memory_swap_free` -> `memory_virtual_memory_free`
  - `memory_swap_total` -> `memory_virtual_memory_total`
  - `memory_swap_percentage` -> `memory_virtual_memory_percentage`
* Fix/Change UI init setting for Windows Swap -> Virtual Memory
* Fix `Memory Swap Usage`/`Virtual Memory Usage` display with UI init.(Linux/Windows)
  • Loading branch information
lagagain committed Apr 16, 2024
1 parent c551a9d commit d8921d5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
* Fix not throw error when part of expression not matched any expression node in the `MQE` and `PromQL.
* Remove `kafka-fetcher/default/createTopicIfNotExist` as the creation is automatically since [#7326](https://github.com/apache/skywalking/issues/7326) (v8.7.0).
* Fix inaccuracy nginx service metrics.
* Fix/Change Windows metrics name(Swap -> Virtual Memory)
- `memory_swap_free` -> `memory_virtual_memory_free`
- `memory_swap_total` -> `memory_virtual_memory_total`
- `memory_swap_percentage` -> `memory_virtual_memory_percentage`
* Fix/Change UI init setting for Windows Swap -> Virtual Memory
* Fix `Memory Swap Usage`/`Virtual Memory Usage` display with UI init.(Linux/Windows)

#### UI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ metricsRules:
exp: windows_os_physical_memory_free_bytes
- name: memory_used
exp: windows_cs_physical_memory_bytes - windows_os_physical_memory_free_bytes
- name: memory_swap_free
- name: memory_virtual_memory_free
exp: windows_os_virtual_memory_free_bytes
- name: memory_swap_total
- name: memory_virtual_memory_total
exp: windows_os_virtual_memory_bytes
- name: memory_swap_percentage
- name: memory_virtual_memory_percentage
exp: 100 - ((windows_os_virtual_memory_free_bytes * 100) / windows_os_virtual_memory_bytes)

#disk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
"showUnit": true
},
"expressions": [
"avg(meter_vm_memory_swap_percentage)/100"
"avg(meter_vm_memory_swap_percentage)"
],
"metricMode": "Expression",
"typesOfMQE": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"i": "8",
"type": "Widget",
"widget": {
"title": "Memory Swap (MB)"
"title": "Virtual Memory (MB)"
},
"graph": {
"type": "Area",
Expand All @@ -144,8 +144,8 @@
"showYAxis": true
},
"expressions": [
"meter_win_memory_swap_free/1024/1024",
"meter_win_memory_swap_total/1024/1024"
"meter_win_memory_virtual_memory_free/1024/1024",
"meter_win_memory_virtual_memory_total/1024/1024"
],
"metricMode": "Expression",
"typesOfMQE": [
Expand All @@ -169,7 +169,7 @@
"i": "9",
"type": "Widget",
"widget": {
"title": "Memory Swap Usage"
"title": "Virtual Memory Usage"
},
"graph": {
"type": "Card",
Expand All @@ -178,7 +178,7 @@
"showUnit": true
},
"expressions": [
"avg(meter_win_memory_swap_percentage/100)"
"avg(meter_win_memory_virtual_memory_percentage)"
],
"metricMode": "Expression",
"typesOfMQE": [
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-v2/cases/win/win-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
cases:
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
expected: expected/service.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_win_memory_swap_total --service-name=10.211.55.3
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_win_memory_virtual_memory_total --service-name=10.211.55.3
expected: expected/metrics-has-value.yml

0 comments on commit d8921d5

Please sign in to comment.