The MongoDB custom monitor captures statistics from the MongoDB server and displays them in the AppDynamics Metric Browser.
This extension works only with the standalone machine agent.
Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
<MachineAgent_Dir>/monitors/The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
Note : Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator
Configure the Mongo instances by editing the config.yml file in
# MongoDB host and port. If ReplicaSet is enabled, configure all OR subset of members of the cluster. servers: - host: "localhost" port: 27017 - host: "localhost" port: 27018 # Specify this key if Password Encryption Support is required else keep it empty # If specified, adminDBPassword and databases passwords are now the encrypted passwords. passwordEncryptionKey: "" # Admin DB username and password. Required if mongod is started with --auth (Authentication) else keep empty # The user should have clusterMonitor role as a minimum adminDBUsername: "admin" adminDBPassword: "admin" # Change ssl to true if mongod is started with ssl. T ssl: false #prefix used to show up metrics in AppDynamics metricPathPrefix: "Custom Metrics|Mongo Server|" #This will create it in specific Tier. Replace
#metricPathPrefix: "Server|Component: |Custom Metrics|Mongo Server|"
Configure the path to the config.yml file by editing the in the monitor.xml file in the
<MACHINE_AGENT_HOME>/monitors/MongoMonitor/ directory. Below is the sample
<task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/MongoMonitor/config.yml" /> .... </task-arguments>
Note : By default, a Machine agent or a AppServer agent can send a fixed number of metrics to the controller. To change this limit, please follow the instructions mentioned here. For eg.
java -Dappdynamics.agent.maxMetrics=2500 -jar machineagent.jar
|Up Time (ms)||The duration of time that the server is up|
|Flushes||Number of times the database has been flushed|
|Total (ms)||Total time (ms) that the mongod process spent writing data to disk|
|Average (ms)||Average time (ms) that the mongod process spent writing data to disk|
|Last (ms)||Time (ms) that the mongod process last spent writing data to disk|
|Current||Number of current connections to the database server from clients. This number includes the current shell connection as well as any inter-node connections to support a replica set or sharded cluster.|
|Available||Number of unused available connections that the database can provide. Consider this value in combination with the value of Current to understand the connection load on the database.|
|Total Time||The total time since the globalLock was started and created|
|Total||Number of active client connections to the database|
|Readers||Number of readers performing read operations|
|Writers||Number of writers performing write operations|
|Total||Number of operations queued before a lock|
|Readers||Number of operations waiting for the read-lock|
|Writers||Number of operations waiting for the write-lock|
|Resident||Amount of RAM (MB) currently used by the database process|
|Virtual||MB currently used by the mongod process|
|Mapped||Amount of mapped memory (MB) used by the database|
|Mapped With Journal||Amount of mapped memory (MB), including memory used for journaling.|
|Bytes In||The amount of network traffic (bytes) received by the database|
|Bytes Out||The amount of network traffic (bytes) sent from the database|
|Number Requests||Number of distinct requests that the server has received|
|Insert||Number of insert operations|
|Query||Number of query operations|
|Update||Number of update operations|
|Delete||Number of delete operations|
|GetMore||Number of getmore operations|
|Command||Total number of commands issued to database|
For each replica the following metrics are reported.
|Up Time (ms)||The duration of time that the server is up|
|Health||Conveys if the member is up (i.e. 1) or down (i.e. 0.)|
|[State](http://docs.mongodb.org/manual/reference/replica-states/)||Value between 0 and 10 that represents the replica state of the member.|
|avgObjSize||The average size of each document in bytes. This is the dataSize divided by the number of documents|
|collections||Contains a count of the number of collections in that database|
|dataSize||The total size in bytes of the data held in this database including the padding factor|
|fileSize||The total size in bytes of the data files that hold the database|
|indexes||Contains a count of the total number of indexes across all collections in the database|
|indexSize||The total size in bytes of all indexes created on this database|
|nsSizeMB||The total size of the namespace files (i.e. that end with .ns) for this database|
|numExtents||Contains a count of the number of extents in the database across all collections|
|objects||Contains a count of the number of objects (i.e. documents) in the database across all collections|
|storageSize||The total amount of space in bytes allocated to collections in this database for document storage|
|count||The number of objects or documents in this collection|
|lastExtentSize||The size of the last extent allocated|
|nindexes||The number of indexes on the collection|
|numExtents||The total number of contiguously allocated data file regions|
|paddingFactor||The amount of space added to the end of each document at insert time|
|size||The size of the data stored in this collection|
|storageSize||The total amount of storage allocated to this collection for document storage|
|systemFlags||Reports the flags on this collection that reflect internal server options|
|totalIndexSize||The total size of all indexes. The scale argument affects this value|
|userFlags||Reports the flags on this collection set by the user|
Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.
Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench
Please look at the troubleshooting document and make sure that everything is followed correctly.
Always feel free to fork and contribute any changes directly via GitHub.
MongoDB Tested on:
List of Changes changes to this extension can be found here