Skip to content

Health Check Configuration

Yaoxing edited this page Jul 19, 2026 · 4 revisions

Most configurations have defaults and work out of the box. Unless you want to customize the tool, you can skip this section.

There is a built-in config.json so you don't need to write your own configuration.

You can pass your own configuration to the tool by specifying -c or --config.

The configuration is organized by module. Each module (healthcheck, log, gmd, ftdc) has its own checksets, item_config, and template sections. This is an example of a minimal /config.json:

{
    "healthcheck": {
        "checksets": {
            "default": {
                "items": [
                    "BuildInfoItem", "ClusterItem", "ServerStatusItem",
                    "ShardKeyItem", "HostInfoItem", "SecurityItem",
                    "CollInfoItem", "IndexInfoItem"
                ]
            }
        },
        "item_config": {
            "BuildInfoItem": {
                "eol_version": [6, 3, 0]
            },
            "CollInfoItem": {
                "obj_size_kb": 32,
                "collection_size_gb": 2048,
                "fragmentation_ratio": 0.5,
                "index_size_ratio": 0.2,
                "op_latency_ms": 100
            },
            "IndexInfoItem": {
                "unused_index_days": 7,
                "num_indexes": 10
            },
            "ClusterItem": {
                "replication_lag_seconds": 60,
                "oplog_window_hours": 48
            },
            "ServerStatusItem": {
                "used_connection_ratio": 0.8,
                "query_targeting": 1000,
                "query_targeting_obj": 1000,
                "cache_read_into_mb": 100,
                "updates_ratio": [0.08, 0.1],
                "dirty_ratio": [0.15, 0.2],
                "cache_fill_ratio": [0.9, 0.95]
            },
            "ShardKeyItem": {
                "sharding_imbalance_percentage": 0.1
            }
        },
        "template": "healthcheck/full.html"
    },
    "log": {
        "sample_rate": 1.0,
        "logsets": { "...": "..." },
        "item_config": { "...": "..." },
        "template": "log/full.html"
    },
    "gmd": {
        "gmdsets": { "...": "..." },
        "item_config": { "...": "..." },
        "template": "gmd/full.html"
    },
    "ftdc": {
        "ftdcsets": { "...": "..." },
        "item_config": { "...": "..." },
        "template": "ftdc/full.html"
    }
}

The built-in config.json ships with sensible defaults for every module. You only need to specify the keys you want to override.

1 Checksets

The checksets / logsets / gmdsets / ftdcsets section in the above example.

Checksets allow you to define a group of check items that you want to run. By default there is a default checkset, which enables all check items. You can define new checksets that include different items, and choose which to run by passing -s or --checkset with the set name.

To define a checkset, add a new key in the checksets section:

  • checksets.<your set name>.items: Array of strings. The names of check items.

2 Item Config

The item_config section in the above example.

Each check item uses thresholds to help determine whether a value is in a reasonable range. Some items don't need any thresholds, like the SecurityItem. Exceeding any threshold will record a test fail item in the final report.

Item Name Value Meaning Default
BuildInfoItem eol_version Version older than this is considered end of life. [6, 3, 0]
CollInfoItem obj_size_kb Largest object size in KB. 32
CollInfoItem collection_size_gb Largest collection size in GB. 2048
CollInfoItem fragmentation_ratio Highest storage fragmentation ratio. 0.5
CollInfoItem index_size_ratio Largest index:storage ratio. 0.2
CollInfoItem op_latency_ms Highest operation latency in ms. 100
IndexInfoItem unused_index_days Longest unused days. 7
IndexInfoItem num_indexes Number of indexes on one collection. 10
ClusterItem replication_lag_seconds Replication lag in seconds. 60
ClusterItem oplog_window_hours Oplog window in hours. 48
ServerStatusItem used_connection_ratio Highest used:total connection ratio. 0.8
ServerStatusItem query_targeting Scanned:Returned. 1000
ServerStatusItem query_targeting_obj Scanned Object:Returned. 1000
ServerStatusItem cache_read_into_mb Data read into cache / s. 100
ServerStatusItem updates_ratio WiredTiger updates ratio threshold [high, critical]. [0.08, 0.1]
ServerStatusItem dirty_ratio WiredTiger dirty ratio threshold [high, critical]. [0.15, 0.2]
ServerStatusItem cache_fill_ratio WiredTiger cache fill ratio threshold [high, critical]. [0.9, 0.95]
ShardKeyItem sharding_imbalance_percentage Maximum acceptable shard data imbalance. 0.1

Clone this wiki locally