Monitor SSL-enabled MongoDB
- Create a keystore on the database agent host.
- Import the SSL certificates to this keystore using the following command:
keytool -importcert -trustcacerts -file <mongodb certificate location> -keystore <keystore e.g. path/mongo.jks> -storepass <keystore password> -alias <alias>
- Start the database agent with the following flags:
java -Ddbagent.name=<DBAgent Name> -Djavax.net.ssl.trustStore=<keystore e.g. path/mongo.jks> -Djavax.net.ssl.trustStorePassword=<keystore password> -jar db-agent.jar
- Create the mongodb collector with custom URL:
mongodb://<mongodb-host>:27017/?ssl=true