MongoDB Plugin

This plugin monitors of your MongoDB instance.

Metrics

  • asserts.msg
  • asserts.regular
  • asserts.rollovers
  • asserts.user
  • asserts.warning
  • connections.available
  • connections.current
  • connections.totalCreated
  • mem: bits
  • mem: mapped
  • mem: mappedWithJournal
  • mem: resident
  • mem: supported
  • mem: virtual
  • opLatencies.commands.latency
  • opLatencies.commands.ops
  • opLatencies.reads.latency
  • opLatencies.reads.ops
  • opLatencies.writes.latency
  • opLatencies.writes.ops
  • opcounters.command
  • opcounters.delete
  • opcounters.getmore
  • opcounters.insert
  • opcounters.query
  • opcounters.update

Dependencies

To install the MongoDB plugin, install the pymongo module with the following command: pip install pymongo.

Configure the plugin

To enable the plugin, edit the /etc/agent360-custom.ini file and add the following lines

[mongodb]
enabled=yes
connection_string=mongodb://username:[email protected]:27017/admin

Test the plugin

Run the sudo -u agent360 agent360 test mongodb command and see if it returns any data.

mongodb:
{
"asserts.msg": 0,
"asserts.regular": 0,
"asserts.rollovers": 0,
"asserts.user": 0,
"asserts.warning": 0,
"connections.available": 50743,
"connections.current": 457,
"connections.totalCreated": 0,
"mem":
{
"bits": 64,
"mapped": 0,
"mappedWithJournal": 0,
"resident": 29966,
"supported": true,
"virtual": 45514
},
"opLatencies.commands.latency": 0,
"opLatencies.commands.ops": 0,
"opLatencies.reads.latency": 0,
"opLatencies.reads.ops": 0,
"opLatencies.writes.latency": 0,
"opLatencies.writes.ops": 0,
"opcounters.command": 0,
"opcounters.delete": 0,
"opcounters.getmore": 0,
"opcounters.insert": 0,
"opcounters.query": 0,
"opcounters.update": 0
}

Now you can restart the agent with the service agent360 restart command.

Create Charts

You can now create a chart on the Dashboard with your MongoDB metrics. On the Metrics page, select mongodb as the metric type, and then select any of the metrics to create a chart.