Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2680

[replica set][mongostat] first result with --discover option not working correctly

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      VMWare + CentOS 8

      hi

      when i run `mongostat` with --discover option in a replica set environment(prod) then first result is only localhost and maybe other outputs is correct.

       

       

      root@server1# mongostat --discover
      

      output

       

       

      host                  insert query update delete getmore command dirty used flushes vsize   res qrw arw net_in net_out conn    set repl  time
      localhost:27017       *0    *0     *0     *0       0    10|0  0.1% 0.3%       0 1.81G 97.0M 0|0 1|0  2.19k   78.8k    6 yar    SEC       Jul 30 09:20:50.230host                  insert query update delete getmore command dirty used flushes vsize   res qrw arw net_in net_out conn    set repl  time
      localhost:27017       *0    *0     *0     *0       0     2|0  0.1% 0.3%       0 1.81G 97.0M 0|0 1|0   801b   75.4k    6 yar    SEC       Jul 30 09:20:51.230
      primary-server:27017  *0    *0     *0     *0       0     2|0  0.1% 0.3%       0 1.85G  109M 0|0 1|0   469b   38.2k    8 yar    PRI       Jul 30 09:20:50.259
      server1:27017         *0    *0     *0     *0       0     3|0  0.1% 0.3%       0 1.81G 97.0M 0|0 1|0   936b   76.1k    6 yar    SEC       Jul 30 09:20:50.284
      
      

      and

      why localhost(or current mongod instance) is exists in output ?

      server1 is localhost but result is not same.

      Am I wrong?

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            abolfazl.ziaratban@gmail.com Abolfazl Ziaratban
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: