File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11Release 0.20.6 (unreleased)
22
3+ Fixed bug PMM-8489: Failed to get topology labels when the target server is mongos
34Improvement \#283 : Add storage stats to collection metrics (Thanks Masaru Hoshi @qlik-trial)
45
56
Original file line number Diff line number Diff line change @@ -115,11 +115,11 @@ func (t *topologyInfo) loadLabels(ctx context.Context) error {
115115 }
116116 t .labels [labelClusterID ] = cid
117117
118+ // Standalone instances or mongos instances won't have a replicaset state
118119 state , err := util .MyState (ctx , t .client )
119- if err ! = nil {
120- return errors . Wrapf ( ErrCannotGetTopologyLabels , "error getting replicaset state: %s " , err )
120+ if err = = nil {
121+ t . labels [ labelReplicasetState ] = fmt . Sprintf ( "%d " , state )
121122 }
122- t .labels [labelReplicasetState ] = fmt .Sprintf ("%d" , state )
123123
124124 return nil
125125}
You can’t perform that action at this time.
0 commit comments