@@ -11,6 +11,7 @@ function(this)
1111 discoveryMetric: {
1212 prometheus: 'windows_memory_physical_total_bytes' ,
1313 prometheus_pre_0_30: 'windows_cs_physical_memory_bytes' ,
14+ prometheus_pre_0_31: self .prometheus_pre_0_30,
1415 },
1516 signals: {
1617 memoryTotal: {
@@ -20,14 +21,15 @@ function(this)
2021 description: 'Total physical memory in bytes' ,
2122 unit: 'bytes' ,
2223 sources: {
23- prometheus_pre_0_30: {
24- expr: 'windows_cs_physical_memory_bytes{%(queriesSelector)s}' ,
25- legendCustomTemplate: 'Memory total' ,
26- },
2724 prometheus: {
2825 expr: 'windows_memory_physical_total_bytes{%(queriesSelector)s}' ,
2926 legendCustomTemplate: 'Memory total' ,
3027 },
28+ prometheus_pre_0_30: {
29+ expr: 'windows_cs_physical_memory_bytes{%(queriesSelector)s}' ,
30+ legendCustomTemplate: 'Memory total' ,
31+ },
32+ prometheus_pre_0_31: self .prometheus_pre_0_30,
3133 },
3234 },
3335 memoryFree: {
@@ -37,12 +39,13 @@ function(this)
3739 description: 'Free physical memory in bytes' ,
3840 unit: 'bytes' ,
3941 sources: {
40- prometheus_pre_0_30: {
41- expr: 'windows_os_physical_memory_free_bytes{%(queriesSelector)s}' ,
42- },
4342 prometheus: {
4443 expr: 'windows_memory_physical_free_bytes{%(queriesSelector)s}' ,
4544 },
45+ prometheus_pre_0_30: {
46+ expr: 'windows_os_physical_memory_free_bytes{%(queriesSelector)s}' ,
47+ },
48+ prometheus_pre_0_31: self .prometheus_pre_0_30,
4649 },
4750 },
4851 memoryUsed: {
@@ -52,15 +55,15 @@ function(this)
5255 description: 'Used physical memory in bytes' ,
5356 unit: 'bytes' ,
5457 sources: {
55- prometheus_pre_0_30: {
56- expr: 'windows_cs_physical_memory_bytes{%(queriesSelector)s} - windows_os_physical_memory_free_bytes{%(queriesSelector)s}' ,
57- legendCustomTemplate: 'Memory used' ,
58- },
5958 prometheus: {
6059 expr: 'windows_memory_physical_total_bytes{%(queriesSelector)s} - windows_memory_physical_free_bytes{%(queriesSelector)s}' ,
6160 legendCustomTemplate: 'Memory used' ,
6261 },
63-
62+ prometheus_pre_0_30: {
63+ expr: 'windows_cs_physical_memory_bytes{%(queriesSelector)s} - windows_os_physical_memory_free_bytes{%(queriesSelector)s}' ,
64+ legendCustomTemplate: 'Memory used' ,
65+ },
66+ prometheus_pre_0_31: self .prometheus_pre_0_30,
6467 },
6568 },
6669 memoryUsagePercent: {
@@ -70,12 +73,13 @@ function(this)
7073 description: 'Memory usage percentage' ,
7174 unit: 'percent' ,
7275 sources: {
73- prometheus_pre_0_30: {
74- expr: '100 - windows_os_physical_memory_free_bytes{%(queriesSelector)s} / windows_cs_physical_memory_bytes{%(queriesSelector)s} * 100' ,
75- },
7676 prometheus: {
7777 expr: '100 - windows_memory_physical_free_bytes{%(queriesSelector)s} / windows_memory_physical_total_bytes{%(queriesSelector)s} * 100' ,
7878 },
79+ prometheus_pre_0_30: {
80+ expr: '100 - windows_os_physical_memory_free_bytes{%(queriesSelector)s} / windows_cs_physical_memory_bytes{%(queriesSelector)s} * 100' ,
81+ },
82+ prometheus_pre_0_31: self .prometheus_pre_0_30,
7983 },
8084 },
8185 memoryPageTotal: {
0 commit comments