Installing a remote MongoDB

MongoDB is a NoSQL open source database that is installed with the Cloud APM server. The MongoDB stores data for the transaction tracking feature that is available with the offering, as well as threshold event data. You can install and configure the MongoDB on a remote system from the server. In large-scale environments, an external MongoDB can be used to reduce load at the server.

Before you begin

To check whether MongoDB that was installed with the Cloud APM server is available, enter /usr/bin/apm status mongodb. The output of Service mongodb started (PID 7574) indicates that MongoDB is installed with the Cloud APM server. The installation directory for MongoDB is install_dir/mongodb (default is /opt/ibm/mongodb). MongoDB requires one TCP port that must be available, and is verified during the prerequisite check: 27000.

Check that the cron service is running on the external system. The MongoDB database uses this service for its cron jobs.

About this task

Use this procedure to complete the following tasks:
  • Install the MongoDB on a separate system from the Cloud APM server.
  • Configure communications between the MongoDB and the server.
  • Disable the MongoDB that was locally installed with the server.

For the supported version of MongoDB, see the system requirements report for your offering: IBM Cloud Application Performance Management, Base Private V8.1.4 or IBM Cloud Application Performance Management, Advanced Private V8.1.4. The supported version is available from the Prerequisites tab of the report.

Procedure

  1. Copy the contents of the packages/MongoDB directory from the server installation image to the remote system.
  2. Install and activate MongoDB on a remote system:
    1. On the remote system, change to the directory where you downloaded the MongoDB directory and run one of the following commands:
      • To install MongoDB in the default /opt/ibm/mongodb directory:
        install-mongodb.sh
      • To install MongoDB in a different directory:
        install-mongodb.sh /custom/path
        where /custom/path is the path and directory that you specify.
    2. Run the following command:
      activate-mongodb.sh
    The MongoDB is configured and started.
  3. Configure communications between the remote MongoDB and the Cloud APM server:
    1. If you are not already logged in to the Cloud APM console, log in now.
    2. Click System Configuration > Advanced Configuration and click Mongo Configuration.
    3. In the Host Name field, enter the IP address or fully qualified host name of the remote system where MongoDB is installed.
    4. Click Save to save the configuration.
    After you click Save, the transaction tracking components begin communicating with the remote MongoDB.
  4. Stop the MongoDB that was installed with the Cloud APM server, and disable cron jobs and automatic restart of the MongoDB after restart by running the following command on the system where the Cloud APM server is installed:
    install_dir/mongodb/bin/deactivate-mongodb.sh
    where install_dir is the default /opt/ibm/ installation directory of the server or the custom directory that you specified when you installed the server.
  5. To enable the remote MongoDB for transferring threshold event and transaction tracking data to the Cloud APM server, run the following command on theCloud APM server system:
    touch install_dir/mongodb/mongodb-remote

Results

The MongoDB that is installed with the Cloud APM server is disabled and threshold event and transaction tracking data is transferred between the server and the remote MongoDB.

All new threshold events and new transaction tracking data are transferred between the Cloud APM server and the remote MongoDB.

Existing open events and existing transaction tracking data are not migrated to the new MongoDB. To view existing open events in the Cloud APM console, use the Linux touch command to modify the date and time of all of the private_situation.xml files in the subdirectories under the install_dir/wlp/usr/servers/min/dropins/CentralConfigurationServer.war/data_source directory.

What to do next

MongoDB is initially configured with two user IDs that share the default mongoUsrpasswd@08: admin who has the MongoDB userAdmin role for managing MongoDB user accounts; and user who has no special privileges. You can run the mongopasswd.sh script to change the password for both users simultaneously.