Skip to content

Health Check Output

Yaoxing edited this page Sep 1, 2025 · 4 revisions

The output will be in the output/ or folder specified by you. For each run, there will be a new folder created. Folder name: <checkset name>-<timestamp>. If you set ENV=development the output will be directly in the root output folder.

The output consists of:

  • report.md and report.html: The final report. In the report you'll see the failed items, and some some raw data collected by each check item.
  • <check item>_raw.json: Complete raw data collected by each item. You can use them to integrate with other systems.

Human Readable Report

  • report.md is in markdown format. You can use any preview tool to read visualize the content.
  • report.html is converted from the report.md, and add more interactive functions for easy reading.

Raw Data Structure

The raw data structure are mainly for developers or integration with other systems.

The raw data collected by each item is organized in a structure that reflects the structure of your target cluster. This is mainly because some check items are better run against the cluster. E.g.: Get replica set config and status. While others may be better against the node. E.g.: Get storage fragmentation ratio.

The raw result collected will be mounted at the node or cluster level depending on which it runs against.

Shared Structures

The following structures can show up at many different positions in the result.

Test Result Structure.

  • testResult: array. The failed items.
    • host: string. Hostname of the member. Or cluster if it's running against the cluster level (E.g. sharded cluster, or shard, or config).
    • severity: string. One of HIGH, MEDIUM and LOW.
    • title: string. Item title.
    • description: string. Description of the failed item.

Member Structure

  • members: array. Replica set members.
    • host: string. Hostname of the member.
    • rawResult: object. Raw data collected by the item, against the current host.
    • testResult: array. The failed items. Refer to the Test Result Structure.

Full Structures

Replica Set

If you run against a replica set, this is the output structure.

  • type: string. RS
  • setName: string. The replica set name.
  • members: array. Replica set members. Refer to the Member Structure.
  • rawResult: object. Raw data collected by the item, against the replica set.

Sharded Cluster

If you run against a sharded cluster, this is the output structure.

  • type: SH
  • map: object. Subdocument for all the sharded cluster components.
    • config: object. Subdocument for all the config server members.
      • setName: string. CSRS Replica set name.
      • members: array. CSRS members. Refer to the Member Structure.
      • rawResult: object. Raw data collected by the item, against the CSRS.
      • testResult: array. The failed items against the CSRS. Refer to the Test Result Structure.
    • mongos: object. Subdocument for all the mongos members.
      • setName: string. For mongos the setName will always be set to mongos.
      • members: array. All mongos members. Refer to the Member Structure.
      • rawResult: object. Raw data collected by the item, against the all mongos.
      • testResult: array. The failed items against all mongos. Refer to the Test Result Structure.
    • <shard name>: object. Each shard will be mapped to an item. The key <shard name> is the shard replica set name.
      • setName: string. Shard Replica set name.
      • members: array. Shard members. Refer to the Member Structure.
      • rawResult: object. Raw data collected by the item, against the shard.
      • testResult: array. The failed items against the shard. Refer to the Test Result Structure.
  • rawResult: object. Raw data collected by the item, against the sharded cluster.
  • testResult: array. The failed items. Refer to the shared structures.

Note: if the test was run against map.mongos level, it's essentially the same as running against the cluster. The possible difference is,

  • The cluster level MongoClient is using the connection string provided by the user, which may not include all mongos instances.
  • The map.mongos level MongoClient is using the connection string that include all known mongos instances, selected from config.mongos collections.

The check items usually use the map.mongos level so all mongos are included.

Clone this wiki locally