File tree 2 files changed +16
-16
lines changed
2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -41,19 +41,19 @@ func TestReplsetStatusCollector(t *testing.T) {
41
41
42
42
// The last \n at the end of this string is important
43
43
expected := strings .NewReader (`
44
- # HELP mongodb_myState myState
45
- # TYPE mongodb_myState untyped
46
- mongodb_myState 1
47
- # HELP mongodb_ok ok
48
- # TYPE mongodb_ok untyped
49
- mongodb_ok 1` + "\n " )
44
+ # HELP mongodb_rs_myState replicaSetGetStatus.
45
+ # TYPE mongodb_rs_myState untyped
46
+ mongodb_rs_myState 1
47
+ # HELP mongodb_rs_ok replicaSetGetStatus.
48
+ # TYPE mongodb_rs_ok untyped
49
+ mongodb_rs_ok 1` + "\n " )
50
50
// Filter metrics for 2 reasons:
51
51
// 1. The result is huge
52
52
// 2. We need to check against know values. Don't use metrics that return counters like uptime
53
53
// or counters like the number of transactions because they won't return a known value to compare
54
54
filter := []string {
55
- "mongodb_myState " ,
56
- "mongodb_ok " ,
55
+ "mongodb_rs_myState " ,
56
+ "mongodb_rs_ok " ,
57
57
}
58
58
err := testutil .CollectAndCompare (c , expected , filter ... )
59
59
assert .NoError (t , err )
Original file line number Diff line number Diff line change @@ -41,19 +41,19 @@ func TestServerStatusDataCollector(t *testing.T) {
41
41
42
42
// The last \n at the end of this string is important
43
43
expected := strings .NewReader (`
44
- # HELP mongodb_mem_bits mem.
45
- # TYPE mongodb_mem_bits untyped
46
- mongodb_mem_bits 64
47
- # HELP mongodb_metrics_commands_connPoolSync_failed metrics.commands.connPoolSync.
48
- # TYPE mongodb_metrics_commands_connPoolSync_failed untyped
49
- mongodb_metrics_commands_connPoolSync_failed 0` + "\n " )
44
+ # HELP mongodb_ss_mem_bits serverStatus. mem.
45
+ # TYPE mongodb_ss_mem_bits untyped
46
+ mongodb_ss_mem_bits 64
47
+ # HELP mongodb_ss_metrics_commands_connPoolSync_failed serverStatus. metrics.commands.connPoolSync.
48
+ # TYPE mongodb_ss_metrics_commands_connPoolSync_failed untyped
49
+ mongodb_ss_metrics_commands_connPoolSync_failed 0` + "\n " )
50
50
// Filter metrics for 2 reasons:
51
51
// 1. The result is huge
52
52
// 2. We need to check against know values. Don't use metrics that return counters like uptime
53
53
// or counters like the number of transactions because they won't return a known value to compare
54
54
filter := []string {
55
- "mongodb_mem_bits " ,
56
- "mongodb_metrics_commands_connPoolSync_failed " ,
55
+ "mongodb_ss_mem_bits " ,
56
+ "mongodb_ss_metrics_commands_connPoolSync_failed " ,
57
57
}
58
58
err := testutil .CollectAndCompare (c , expected , filter ... )
59
59
assert .NoError (t , err )
You can’t perform that action at this time.
0 commit comments