---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# MongoDB default checks and policies

# MongoDB default checks and policies {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Agent Client Collector provides the following policies for MongoDB
health monitoring. Policies come with the checks specified in the indicated table. Policies and
checks are available for both Windows and Linux.
{#mongodb-checks-policies__table_y3r_2qd_2tb__entry__6}

| Type | Check | Description | Usage | Command | Output |
|-|-|-|-|-|-|
| Event | app.mongodb.check-mongodb-alive | Monitors whether the MongoDB server is alive and creating alerts for the MongoDB server health status. | `commonchecks check-mongodb-alive -H db_host -p db_port` Where: * `db_host` = Host where server is running. * `db_port` = Port to connect to the MongoDB server. {#mongodb-checks-policies__ul_d32_vtd_2tb} Usage example: `command: commonchecks check-mongodb-alive -H 10.***.***.*** -p 27017` | `commonchecks check-mongodb -p {{.labels.params_port}} -H {{.labels.params_host}} ` | `Check mongodb Alive OK`: Indicates that the server is in good health. |
| Event | app.mongodb.check-mongodb-metrics | Creates alerts for any of the MongoDB metrics, based on the threshold limit. To trigger the alerts for any MongoDB server metric, pass the whole metric name in the parameter. | `commonchecks check-mongodb-metrics -H Hostname -p port -w warning -c critical -d database -m MetricName` Where: * `Hostname` = Host where server is running. * `port` = Port to connect to the MongoDB server. * `warning` = Warning threshold value. * `critical` = Critical threshold value. * `database` = Database name. * `MetricName` = Specific metric to monitor. {#mongodb-checks-policies__ul_q5g_xxd_2tb} Usage example: `command: commonchecks check-mongodb-alive -H 10.***.***.*** -p 27017` | `commonchecks check-mongodb-metrics -c {{.labels.params_critical}} -d {{.labels.params_database}} -w {{.labels.params_warning}} -H {{.labels.params_host}} -p {{.labels.params_port}} -m {{.labels.params_metric}}` | `Check mongodb Metrics OK`: Indicates that the `mongodb.connection.current` value is within the acceptable threshold. |
[Table 1. MongoDB Events]

{#mongodb-checks-policies__table_y3r_2qd_2tb} {#mongodb-checks-policies__table_mqy_xzd_2tb__entry__6}

| Type | Check | Description | Usage | Command | Output |
|-|-|-|-|-|-|
| Metric | app.mongodb.metrics-mongodb | Returns metrics of the MongoDB server and all databases. Sample metrics: * `mongodb.connections.totalCreated`: Incoming connections * `mongodb.locks.Database.acquireCount_IX `: Intent Exclusive lock mode * `mongodb.locks.Database.acquireCount_X `: Exclusive lock mode * `mongodb.locks.Database.acquireCount_IS `: Intent shared lock mode {#mongodb-checks-policies__ul_arl_w12_2tb} | `commonchecks check-mongodb` Where: * `host` = Hostname where the MongoDB server is running. * `port` = Port to connect to the MongoDB server. * `database` = Database name. {#mongodb-checks-policies__ul_w3n_f12_2tb} | `commonchecks metrics-mongodb -p {{.labels.params_port}} -H {{.labels.params_host}} -d {{.labels.params_database}}` | `<hostname>.mongodb.connections.totalCreated 20632 1639498004` |
[Table 2. MongoDB Metrics]

{#mongodb-checks-policies__table_mqy_xzd_2tb}

