File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -40,19 +40,19 @@ func TestReplsetStatusCollector(t *testing.T) {
40
40
41
41
// The last \n at the end of this string is important
42
42
expected := strings .NewReader (`
43
- # HELP mongodb_myState myState
44
- # TYPE mongodb_myState untyped
45
- mongodb_myState 1
46
- # HELP mongodb_ok ok
47
- # TYPE mongodb_ok untyped
48
- mongodb_ok 1` + "\n " )
43
+ # HELP mongodb_rs_myState replSetGetStatus.
44
+ # TYPE mongodb_rs_myState untyped
45
+ mongodb_rs_myState 1
46
+ # HELP mongodb_rs_ok replSetGetStatus.
47
+ # TYPE mongodb_rs_ok untyped
48
+ mongodb_rs_ok 1` + "\n " )
49
49
// Filter metrics for 2 reasons:
50
50
// 1. The result is huge
51
51
// 2. We need to check against know values. Don't use metrics that return counters like uptime
52
52
// or counters like the number of transactions because they won't return a known value to compare
53
53
filter := []string {
54
- "mongodb_myState " ,
55
- "mongodb_ok " ,
54
+ "mongodb_rs_myState " ,
55
+ "mongodb_rs_ok " ,
56
56
}
57
57
err := testutil .CollectAndCompare (c , expected , filter ... )
58
58
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