MongoDB is an open-source document database and leading NoSQL database. This plugin gathers information about performance, connections, network and memory, etc.

Setup & Configuration

The MongoDB plugin is included with the Atatus Infra agent by default, please follow the below section to enable.

  1. Copy the MongoDB example configuration file.

    copy
    icon/buttons/copy
    cd /etc/atatus-infra-agent/conf.d/mongodb.d/
    sudo cp mongodb.yml.template mongodb.yml
    
  2. Update the file /etc/atatus-infra-agent/conf.d/mongodb.d/mongodb.yml with below configurations..

    copy
    icon/buttons/copy
    #Metrics section
    metrics:
    
          # The hosts must be passed as MongoDB URLs in the format:
          # hosts: ["mongodb://myuser:mypass@localhost:27017"].
          # The username and password can also be set using the respective configuration
        - hosts: ["localhost:27017"]
    
          # Username of hosts Empty by default.
          #username:
    
          # Password of hosts Empty by default.
          #password:
    
  3. Restart the atatus infrastructure agent.

    copy
    icon/buttons/copy
    sudo service atatus-infra-agent restart
    

Metrics

Name Description Type
mongodb.status.connections.current The number of connections to the database server from clients. This number includes the current shell session. Consider the value of available to add more context to this datum. long
mongodb.status.connections.available The number of unused available incoming connections the database can provide. long
mongodb.status.global_lock.active_clients.readers The number of the active client connections performing read operations. long
mongodb.status.ops.counters.insert The total number of insert operations received since the mongod instance last started. long
mongodb.status.ops.counters.query The total number of queries received since the mongod instance last started. long
mongodb.status.ops.counters.update The total number of update operations received since the mongod instance last started. long
mongodb.status.ops.counters.delete The total number of delete operations received since the mongod instance last started. long
mongodb.status.ops.counters.getmore The total number of getmore operations received since the mongod instance last started. long
mongodb.status.ops.counters.command The total number of commands issued to the database since the mongod instance last started. long
mongodb.status.global_lock.current_queue.readers The number of operations that are currently queued and waiting for the read lock. long
mongodb.status.global_lock.current_queue.writers The number of operations that are currently queued and waiting for the write lock. long
mongodb.status.background_flushing.average.ms The average time spent flushing to disk per flush event. long
mongodb.status.ops.counters.getmore The total number of getmore operations received since the mongod instance last started. long
mongodb.metrics.cursor.open.total The number of cursors that MongoDB is maintaining for clients. long
mongodb.metrics.cursor.timed_out The total number of cursors that have timed out since the server process started. long
mongodb.status.extra_info.page_faults The total number of page faults that require disk operations. Page faults refer to operations that require the database server to access data that isn’t available in active memory. long
mongodb.status.memory.resident.mb The amount of RAM, in megabytes (MB), currently used by the database process. long
mongodb.status.memory.virtual.mb The amount, in megabytes (MB), of virtual memory used by the mongod process. long
mongodb.status.memory.mapped.mb The amount of mapped memory, in megabytes (MB), used by the database. Because MongoDB uses memory-mapped files, this value is likely to be to be roughly equivalent to the total size of your database or databases. long
mongodb.status.asserts.regular Number of regular assertions produced by the server. long
mongodb.status.asserts.warning Number of warning assertions produced by the server. long
mongodb.status.asserts.msg Number of msg assertions produced by the server. long
mongodb.status.asserts.user Number of user assertions produced by the server. long
mongodb.status.asserts.rollovers Number of rollovers assertions produced by the server. long
mongodb.status.global_lock.active_clients.writers The number of the active client connections performing write operations. long
mongodb.dbstats.data_size.bytes Total size of the data held in this database. long