Fix inaccurate MongoDB Metrics & Add label for complex MQE in Nginx dashboard. (#12126)
This commit is contained in:
parent
630d54d963
commit
d71f858f2f
|
|
@ -106,6 +106,7 @@
|
|||
* Fix/Change UI init setting for Windows Swap -> Virtual Memory
|
||||
* Fix `Memory Swap Usage`/`Virtual Memory Usage` display with UI init.(Linux/Windows)
|
||||
* Fix inaccurate APISIX metrics
|
||||
* Fix inaccurate MongoDB Metrics.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -25,21 +25,21 @@ MongoDB monitoring provides multidimensional metrics monitoring of MongoDB clust
|
|||
|
||||
### MongoDB Cluster Supported Metrics
|
||||
|
||||
| Monitoring Panel | Unit | Metric Name | Description | Data Source |
|
||||
|-----------------------------------|------|-------------------------------------------|---------------------------------------------------------------------|------------------|
|
||||
| Uptime (day) | day | meter_mongodb_cluster_uptime | Maximum uptime of nodes in the cluster | mongodb-exporter |
|
||||
| Data Size (GB) | GB | meter_mongodb_cluster_data_size | Total data size of the cluster | mongodb-exporter |
|
||||
| Collection Count | | meter_mongodb_cluster_collection_count | Number of collection of the cluster | mongodb-exporter |
|
||||
| Object Count | | meter_mongodb_cluster_object_count | Number of object of the cluster | mongodb-exporter |
|
||||
| Document Avg QPS | | meter_mongodb_cluster_document_avg_qps | Avg document operations rate of nodes | mongodb-exporter |
|
||||
| Operation Avg QPS | | meter_mongodb_cluster_operation_avg_qps | Avg operations rate of nodes | mongodb-exporter |
|
||||
| Total Connections | | meter_mongodb_cluster_connections | Cluster total connections of nodes | mongodb-exporter |
|
||||
| Cursor Avg | | meter_mongodb_cluster_cursor_avg | Avg Opened cursor of nodes | mongodb-exporter |
|
||||
| Replication Lag (ms) | ms | meter_mongodb_cluster_repl_lag | Repl set member avg replication lag, this metric works in repl mode | mongodb-exporter |
|
||||
| DB Avg Data Size Per Shard (GB) | GB | meter_mongodb_cluster_db_data_size | Avg data size per shard (replSet) of every database | mongodb-exporter |
|
||||
| DB Avg Index Size Per Shard (GB) | GB | meter_mongodb_cluster_db_index_size | Avg index size per shard (replSet) of every database | mongodb-exporter |
|
||||
| DB Avg Collection Count Per Shard | | meter_mongodb_cluster_db_collection_count | Avg collection count per shard (replSet) of every database | mongodb-exporter |
|
||||
| DB Avg Index Count Per Shard | | meter_mongodb_cluster_db_index_count | Avg index count per shard (replSet) of every database | mongodb-exporter |
|
||||
| Monitoring Panel | Unit | Metric Name | Description | Data Source |
|
||||
|---------------------------|------|-------------------------------------------|---------------------------------------------------------------------|------------------|
|
||||
| Uptime (day) | day | meter_mongodb_cluster_uptime | Maximum uptime of nodes in the cluster | mongodb-exporter |
|
||||
| Data Size (GB) | GB | meter_mongodb_cluster_data_size | Total data size of the cluster | mongodb-exporter |
|
||||
| Collection Count | | meter_mongodb_cluster_collection_count | Number of collection of the cluster | mongodb-exporter |
|
||||
| Object Count | | meter_mongodb_cluster_object_count | Number of object of the cluster | mongodb-exporter |
|
||||
| Document Total QPS | | meter_mongodb_cluster_document_avg_qps | Total document operations rate of nodes | mongodb-exporter |
|
||||
| Operation Total QPS | | meter_mongodb_cluster_operation_avg_qps | Total operations rate of nodes | mongodb-exporter |
|
||||
| Total Connections | | meter_mongodb_cluster_connections | Cluster total connections of nodes | mongodb-exporter |
|
||||
| Cursor Total | | meter_mongodb_cluster_cursor_avg | Total Opened cursor of nodes | mongodb-exporter |
|
||||
| Replication Lag (ms) | ms | meter_mongodb_cluster_repl_lag | Repl set member avg replication lag, this metric works in repl mode | mongodb-exporter |
|
||||
| DB Total Data Size (GB) | GB | meter_mongodb_cluster_db_data_size | Total data size of every database | mongodb-exporter |
|
||||
| DB Total Index Size (GB) | GB | meter_mongodb_cluster_db_index_size | Total index size per of every database | mongodb-exporter |
|
||||
| DB Total Collection Count | | meter_mongodb_cluster_db_collection_count | Total collection count of every database | mongodb-exporter |
|
||||
| DB Total Index Count | | meter_mongodb_cluster_db_index_count | Total index count of every database | mongodb-exporter |
|
||||
|
||||
### MongoDB Node Supported Metrics
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ MongoDB monitoring provides multidimensional metrics monitoring of MongoDB clust
|
|||
|------------------------------|------|-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------------|
|
||||
| Uptime (day) | day | meter_mongodb_node_uptime | Uptime of the node | mongodb-exporter |
|
||||
| QPS | | meter_mongodb_node_qps | Operations per second of the node | mongodb-exporter |
|
||||
| Latency | µs | meter_mongodb_node_latency | Latency of operations | mongodb-exporter |
|
||||
| Latency | µs | meter_mongodb_node_op_rate<br/>meter_mongodb_node_latency_rate | Latency of operations | mongodb-exporter |
|
||||
| Memory Usage | % | meter_mongodb_node_memory_usage | Memory usage percent of RAM | mongodb-exporter |
|
||||
| Version | | meter_mongodb_node_version | MongoDB edition and version | mongodb-exporter |
|
||||
| ReplSet State | | meter_mongodb_node_rs_state | Repl set state of the node, this metric works in repl mode | mongodb-exporter |
|
||||
|
|
@ -61,7 +61,7 @@ MongoDB monitoring provides multidimensional metrics monitoring of MongoDB clust
|
|||
| Document QPS | | meter_mongodb_node_document_qps | Document operations per second | mongodb-exporter |
|
||||
| Operation QPS | | meter_mongodb_node_operation_qps | Operations per second | mongodb-exporter |
|
||||
| Repl Operation QPS | | meter_mongodb_node_repl_operation_qps | Repl operations per second | mongodb-exporter |
|
||||
| Operation Latency (µs) | µs | meter_mongodb_node_operation_latency | Latencies for different operation type | mongodb-exporter |
|
||||
| Operation Latency (µs) | µs | meter_mongodb_node_op_rate<br/>meter_mongodb_node_latency_rate | Latencies for different operation type | mongodb-exporter |
|
||||
| Cursor | | meter_mongodb_node_cursor | Opened cursor of the node | mongodb-exporter |
|
||||
| Server Status Memory (MB) | MB | meter_mongodb_node_mem_virtual<br/>meter_mongodb_node_mem_resident | Virtual and resident memory of the node | mongodb-exporter |
|
||||
| Asserts | | meter_mongodb_node_asserts | The rate of raised assertions | mongodb-exporter |
|
||||
|
|
|
|||
|
|
@ -42,22 +42,22 @@ metricsRules:
|
|||
exp: mongodb_dbstats_objects.tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'rs_nm'])
|
||||
|
||||
- name: document_avg_qps
|
||||
exp: mongodb_ss_metrics_document.max(['cluster','doc_op_type']).rate('PT1M')
|
||||
exp: mongodb_ss_metrics_document.max(['cluster','doc_op_type','service_instance_id']).rate('PT1M')
|
||||
- name: operation_avg_qps
|
||||
exp: mongodb_ss_opcounters.max(['cluster','legacy_op_type']).rate('PT1M')
|
||||
exp: mongodb_ss_opcounters.max(['cluster','legacy_op_type','service_instance_id']).rate('PT1M')
|
||||
|
||||
- name: connections
|
||||
exp: mongodb_ss_connections.tagEqual('conn_type','current').max(['cluster','service_instance_id'])
|
||||
- name: cursor_avg
|
||||
exp: mongodb_ss_metrics_cursor_open.max(['cluster',"csr_type"])
|
||||
exp: mongodb_ss_metrics_cursor_open.max(['cluster','csr_type','service_instance_id'])
|
||||
- name: repl_lag
|
||||
exp: mongodb_mongod_replset_member_replication_lag.tag({tags -> tags.rs_nm = tags.set}).avg(['cluster','rs_nm'])
|
||||
exp: mongodb_mongod_replset_member_replication_lag.tag({tags -> tags.rs_nm = tags.set}).tagNotEqual('state','ARBITER').avg(['cluster','rs_nm'])
|
||||
|
||||
- name: db_data_size
|
||||
exp: mongodb_dbstats_dataSize.tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database'])
|
||||
exp: mongodb_dbstats_dataSize.tagEqual('rs_state', '1').tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database','service_instance_id'])
|
||||
- name: db_index_size
|
||||
exp: mongodb_dbstats_indexSize.tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database'])
|
||||
exp: mongodb_dbstats_indexSize.tagEqual('rs_state', '1').tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database','service_instance_id'])
|
||||
- name: db_collection_count
|
||||
exp: mongodb_dbstats_collections.tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database'])
|
||||
exp: mongodb_dbstats_collections.tagEqual('rs_state', '1').tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster', 'database','service_instance_id'])
|
||||
- name: db_index_count
|
||||
exp: mongodb_dbstats_indexes.tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster' , 'database'])
|
||||
exp: mongodb_dbstats_indexes.tagEqual('rs_state', '1').tagNotEqual('cl_role','mongos').tagNotEqual('database','local').sum(['cluster' , 'database','service_instance_id'])
|
||||
|
|
@ -36,8 +36,10 @@ metricsRules:
|
|||
exp: mongodb_ss_uptime
|
||||
- name: qps
|
||||
exp: mongodb_ss_opcounters.sum(['cluster','service_instance_id']).rate('PT1M')
|
||||
- name: latency
|
||||
exp: mongodb_ss_opLatencies_latency.sum(['cluster','service_instance_id']).rate('PT1M') / mongodb_ss_opLatencies_ops.sum(['cluster','service_instance_id']).rate('PT1M')
|
||||
- name: op_rate
|
||||
exp: mongodb_ss_opLatencies_ops.sum(['cluster','service_instance_id', 'op_type']).rate('PT1M')
|
||||
- name: latency_rate
|
||||
exp: mongodb_ss_opLatencies_latency.sum(['cluster','service_instance_id', 'op_type']).rate('PT1M')
|
||||
- name: memory_usage
|
||||
exp: (mongodb_sys_memory_MemTotal_kb - mongodb_sys_memory_MemAvailable_kb) / mongodb_sys_memory_MemTotal_kb * 100
|
||||
- name: version
|
||||
|
|
@ -80,8 +82,6 @@ metricsRules:
|
|||
- name: repl_operation_qps
|
||||
exp: mongodb_ss_opcountersRepl.sum(['cluster','service_instance_id','legacy_op_type']).rate('PT1M')
|
||||
|
||||
- name: operation_latency
|
||||
exp: mongodb_ss_opLatencies_latency.max(['cluster','service_instance_id',"op_type"]).rate('PT1M') / mongodb_ss_opLatencies_ops.max(['cluster','service_instance_id',"op_type"]).rate('PT1M')
|
||||
- name: cursor
|
||||
exp: mongodb_ss_metrics_cursor_open.max(['cluster','service_instance_id',"csr_type"])
|
||||
- name: mem_virtual
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
"i": "4",
|
||||
"type": "Widget",
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_document_avg_qps"
|
||||
"aggregate_labels(meter_mongodb_cluster_document_avg_qps, sum(doc_op_type))"
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
"showYAxis": true
|
||||
},
|
||||
"widget": {
|
||||
"title": "Document Avg QPS"
|
||||
"title": "Document Total QPS"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
"i": "5",
|
||||
"type": "Widget",
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_operation_avg_qps"
|
||||
"aggregate_labels(meter_mongodb_cluster_operation_avg_qps, sum(legacy_op_type))"
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
"showYAxis": true
|
||||
},
|
||||
"widget": {
|
||||
"title": "Operation Avg QPS"
|
||||
"title": "Operation Total QPS"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -158,6 +158,11 @@
|
|||
"expressions": [
|
||||
"aggregate_labels(meter_mongodb_cluster_connections,sum)"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "connections"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
"step": false,
|
||||
|
|
@ -178,7 +183,7 @@
|
|||
"i": "7",
|
||||
"type": "Widget",
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_cursor_avg"
|
||||
"aggregate_labels(meter_mongodb_cluster_cursor_avg, sum(csr_type))"
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
|
|
@ -189,7 +194,7 @@
|
|||
"showYAxis": true
|
||||
},
|
||||
"widget": {
|
||||
"title": "Cursor Avg"
|
||||
"title": "Cursor Total"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -222,7 +227,8 @@
|
|||
"i": "9",
|
||||
"type": "Widget",
|
||||
"widget": {
|
||||
"title": "DB Avg Data Size Per Shard (GB)"
|
||||
"title": "DB Total Data Size (GB)",
|
||||
"tips": "Summation according to database primary node"
|
||||
},
|
||||
"graph": {
|
||||
"type": "Table",
|
||||
|
|
@ -231,7 +237,7 @@
|
|||
"tableHeaderCol2": ""
|
||||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_db_data_size/1024/1024/1024"
|
||||
"latest(aggregate_labels(meter_mongodb_cluster_db_data_size, sum(database)))/1024/1024/1024"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -242,7 +248,8 @@
|
|||
"i": "10",
|
||||
"type": "Widget",
|
||||
"widget": {
|
||||
"title": "DB Avg Index Size Per Shard (GB)"
|
||||
"title": "DB Total Index Size (GB)",
|
||||
"tips": "Summation according to database primary node"
|
||||
},
|
||||
"graph": {
|
||||
"type": "Table",
|
||||
|
|
@ -251,7 +258,7 @@
|
|||
"tableHeaderCol2": ""
|
||||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_db_index_size/1024/1024/1024"
|
||||
"latest(aggregate_labels(meter_mongodb_cluster_db_index_size, sum(database)))/1024/1024/1024"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -262,7 +269,8 @@
|
|||
"i": "11",
|
||||
"type": "Widget",
|
||||
"widget": {
|
||||
"title": "DB Avg Collection Count Per Shard"
|
||||
"title": "DB Total Collection Count",
|
||||
"tips": "Summation according to database primary node"
|
||||
},
|
||||
"graph": {
|
||||
"type": "Table",
|
||||
|
|
@ -271,7 +279,7 @@
|
|||
"tableHeaderCol2": ""
|
||||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_db_collection_count"
|
||||
"latest(aggregate_labels(meter_mongodb_cluster_db_collection_count, sum(database)))"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -282,7 +290,8 @@
|
|||
"i": "12",
|
||||
"type": "Widget",
|
||||
"widget": {
|
||||
"title": "DB Avg Index Count Per Shard"
|
||||
"title": "DB Total Index Count",
|
||||
"tips": "Summation according to database primary node"
|
||||
},
|
||||
"graph": {
|
||||
"type": "Table",
|
||||
|
|
@ -291,7 +300,7 @@
|
|||
"tableHeaderCol2": ""
|
||||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_cluster_db_index_count"
|
||||
"latest(aggregate_labels(meter_mongodb_cluster_db_index_count, sum(database)))"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
"title": "Latency"
|
||||
},
|
||||
"expressions": [
|
||||
"avg(meter_mongodb_node_latency)"
|
||||
"avg(aggregate_labels(meter_mongodb_node_latency_rate,sum)/aggregate_labels(meter_mongodb_node_op_rate,sum))"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
|
|
@ -148,6 +148,11 @@
|
|||
"expressions": [
|
||||
"meter_mongodb_node_cpu_total_percentage"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "CPU usage"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
"step": false,
|
||||
|
|
@ -271,6 +276,11 @@
|
|||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_node_connections"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "connections"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -431,7 +441,7 @@
|
|||
"title": "Operation Latency (µs)"
|
||||
},
|
||||
"expressions": [
|
||||
"meter_mongodb_node_operation_latency"
|
||||
"aggregate_labels(meter_mongodb_node_latency_rate,sum(op_type))/aggregate_labels(meter_mongodb_node_op_rate,sum(op_type))"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -523,6 +533,11 @@
|
|||
"expressions": [
|
||||
"meter_mongodb_node_repl_buffer_count"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "repl buffer count"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Line",
|
||||
"step": false,
|
||||
|
|
@ -633,6 +648,11 @@
|
|||
"expressions": [
|
||||
"meter_mongodb_node_write_wait_time"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "write wait time"
|
||||
}
|
||||
],
|
||||
"widget": {
|
||||
"title": "getLastError Write Time (ms)"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@
|
|||
},
|
||||
"expressions": [
|
||||
"meter_nginx_endpoint_http_requests"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP request trend"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -101,6 +106,11 @@
|
|||
"expressions": [
|
||||
"(meter_nginx_endpoint_http_4xx_requests_increment/meter_nginx_endpoint_http_requests_increment)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 4xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
@ -121,6 +131,11 @@
|
|||
"expressions": [
|
||||
"(meter_nginx_endpoint_http_5xx_requests_increment/meter_nginx_endpoint_http_requests_increment)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 5xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@
|
|||
},
|
||||
"expressions": [
|
||||
"meter_nginx_instance_http_requests"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP request trend"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -123,6 +128,11 @@
|
|||
"expressions": [
|
||||
"(meter_nginx_instance_http_4xx_requests_increment/meter_nginx_instance_http_requests_increment)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 4xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
@ -143,6 +153,11 @@
|
|||
"expressions": [
|
||||
"(meter_nginx_instance_http_5xx_requests_increment/meter_nginx_instance_http_requests_increment)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 5xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@
|
|||
},
|
||||
"expressions": [
|
||||
"aggregate_labels(meter_nginx_service_http_requests, sum)"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP request trend"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -134,6 +139,11 @@
|
|||
"expressions": [
|
||||
"aggregate_labels(meter_nginx_service_http_4xx_requests_increment, sum)/aggregate_labels(meter_nginx_service_http_requests_increment, sum)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 4xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
@ -154,6 +164,11 @@
|
|||
"expressions": [
|
||||
"aggregate_labels(meter_nginx_service_http_5xx_requests_increment, sum)/aggregate_labels(meter_nginx_service_http_requests_increment, sum)*100"
|
||||
],
|
||||
"metricConfig": [
|
||||
{
|
||||
"label": "HTTP 5xx percent"
|
||||
}
|
||||
],
|
||||
"graph": {
|
||||
"type": "Area",
|
||||
"opacity": 0.4,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
# 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.
|
||||
|
||||
type: TIME_SERIES_VALUES
|
||||
results:
|
||||
{{- contains .results }}
|
||||
- metric:
|
||||
labels:
|
||||
{{- contains .metric.labels }}
|
||||
- key: csr_type
|
||||
value: {{ .value }}
|
||||
- key: service_instance_id
|
||||
value: {{ .value }}
|
||||
{{- end}}
|
||||
values:
|
||||
{{- contains .values }}
|
||||
- id: {{ notEmpty .id }}
|
||||
value: {{ .value }}
|
||||
traceid: null
|
||||
- id: {{ notEmpty .id }}
|
||||
value: null
|
||||
traceid: null
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
error: null
|
||||
|
|
@ -21,6 +21,8 @@ results:
|
|||
{{- contains .metric.labels }}
|
||||
- key: database
|
||||
value: {{ .value }}
|
||||
- key: service_instance_id
|
||||
value: {{ .value }}
|
||||
{{- end}}
|
||||
values:
|
||||
{{- contains .values }}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# 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.
|
||||
|
||||
type: TIME_SERIES_VALUES
|
||||
results:
|
||||
{{- contains .results }}
|
||||
- metric:
|
||||
labels:
|
||||
{{- contains .metric.labels }}
|
||||
- key: doc_op_type
|
||||
value: {{ .value }}
|
||||
- key: service_instance_id
|
||||
value: {{ .value }}
|
||||
{{- end}}
|
||||
values:
|
||||
{{- contains .values }}
|
||||
- id: {{ notEmpty .id }}
|
||||
value: {{ .value }}
|
||||
traceid: null
|
||||
- id: {{ notEmpty .id }}
|
||||
value: null
|
||||
traceid: null
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
error: null
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# 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.
|
||||
|
||||
type: TIME_SERIES_VALUES
|
||||
results:
|
||||
{{- contains .results }}
|
||||
- metric:
|
||||
labels:
|
||||
{{- contains .metric.labels }}
|
||||
- key: legacy_op_type
|
||||
value: {{ .value }}
|
||||
- key: service_instance_id
|
||||
value: {{ .value }}
|
||||
{{- end}}
|
||||
values:
|
||||
{{- contains .values }}
|
||||
- id: {{ notEmpty .id }}
|
||||
value: {{ .value }}
|
||||
traceid: null
|
||||
- id: {{ notEmpty .id }}
|
||||
value: null
|
||||
traceid: null
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
error: null
|
||||
|
|
@ -28,23 +28,23 @@ cases:
|
|||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_object_count --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_document_avg_qps --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-doc.yml
|
||||
expected: expected/metrics-has-value-label-doc-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_operation_avg_qps --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-legacy.yml
|
||||
expected: expected/metrics-has-value-label-legacy-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_connections --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-ins.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_cursor_avg --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-csr.yml
|
||||
expected: expected/metrics-has-value-label-csr-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_repl_lag --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_db_data_size --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-database.yml
|
||||
expected: expected/metrics-has-value-label-database-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_db_index_size --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-database.yml
|
||||
expected: expected/metrics-has-value-label-database-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_db_collection_count --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-database.yml
|
||||
expected: expected/metrics-has-value-label-database-service_instance_id.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_cluster_db_index_count --service-name=mongodb::replset
|
||||
expected: expected/metrics-has-value-label-database.yml
|
||||
expected: expected/metrics-has-value-label-database-service_instance_id.yml
|
||||
|
||||
# instance cases
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance ls --service-name=mongodb::replset
|
||||
|
|
@ -53,8 +53,10 @@ cases:
|
|||
expected: expected/metrics-has-value.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_qps --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_latency --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_op_rate --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value-label-op.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_latency_rate --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value-label-op.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_memory_usage --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_version --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
|
|
@ -93,8 +95,6 @@ cases:
|
|||
expected: expected/metrics-has-value-label-legacy.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_repl_operation_qps --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value-label-legacy.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_operation_latency --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value-label-op.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_cursor --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
expected: expected/metrics-has-value-label-csr.yml
|
||||
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_mongodb_node_mem_virtual --service-name=mongodb::replset --instance-name=mongodb-exporter-1:9216
|
||||
|
|
|
|||
Loading…
Reference in New Issue