MongoDB OpsManager 3.6.5 installation and monitoring agent configuration

OpsManager 3.6.5 installation

This is just a quick guide for myself, documenting step by step how to implement MongoDB OpsManagernote: mongod version: 3.6.x

Download from
https://www.mongodb.com/download-center#ops-manager


1. Create backing databases
a. OpsManager App DB
b. OpsManager Backup DB (Op DB, BlockStore DB)

Startup backing app db.

sudo -u mongod mongod --port 25001 --dbpath /data/mongod/appDB --logpath /data/mongod/appDBLog/applog1.log --replSet opApp --bind_ip localhost,10.155.228.75 --cpu --fork
sudo -u mongod mongod --port 25001 --dbpath /data/mongod/appDB --logpath /data/mongod/appDBLog/applog1.log --replSet opApp --bind_ip localhost,10.155.208.207 --cpu --fork
sudo -u mongod mongod --port 25001 --dbpath /data/mongod/appArb --logpath /data/mongod/appArbLog/appArblog1.log --replSet opApp --cpu --bind_ip localhost,10.155.208.169 --fork
on host 75
mongo --port 25001
rs.initiate()
run as MongoDB Enterprise opApp:PRIMARY>
rs.add({host:"10.155.208.207:25001"})
rs.addArb("10.155.208.169:25001")



Startup backing backup db (opDB)

sudo -u mongod mongod --port 35001 --dbpath /data/mongod/opDB --logpath /data/mongod/opDBLog/oplog1.log --replSet opStore --bind_ip localhost,10.155.228.75 --cpu --fork
sudo -u mongod mongod --port 35001 --dbpath /data/mongod/opDB --logpath /data/mongod/opDBLog/oplog1.log --replSet opStore --bind_ip localhost,10.155.208.169 --cpu --fork
sudo -u mongod mongod --port 35001 --dbpath /data/mongod/opArb --logpath /data/mongod/opArbLog/opArblog1.log --replSet opStore --cpu --bind_ip localhost,10.155.208.207 --fork
mongo --port 35001
rs.initiate()
rs.add({host:"10.155.208.169:35001"})
rs.addArb("10.155.208.207:35001")

(blockStoreDB)

sudo -u mongod mongod --port 45001 --dbpath /data/mongod/bsDB --logpath /data/mongod/bsDBLog/bslog1.log --replSet bsStore --bind_ip localhost,10.155.228.75 --cpu --fork
sudo -u mongod mongod --port 45001 --dbpath /data/mongod/bsDB --logpath /data/mongod/bsDBLog/bsLog1.log --replSet bsStore --bind_ip localhost,10.155.208.169 --cpu --fork
sudo -u mongod mongod --port 45001 --dbpath /data/mongod/bsArb --logpath /data/mongod/bsArbLog/bsArblog1.log --replSet bsStore --cpu --bind_ip localhost,10.155.208.207 --fork
mongo --port 45001
rs.initiate()
rs.add({host:"10.155.208.169:45001"})
rs.addArb("10.155.208.207:45001")



download mongodb opsmanager rpm and copy to /data/mongod folder


sudo rpm -ivh mongodb-mms-<version>.x86_64.rpm

When installed, the base directory for the Ops Manager software is /opt/mongodb/mms/. The .rpmpackage creates a new system user mongodb-mms under which the server runs.

find the version of redhat due to https://docs.opsmanager.mongodb.com/current/tutorial/install-on-prem-with-rpm-packages/#only-if-you-installed-to-rhel-7-1-or-7-2-replace-symlinks-with-scripts

[root@msdlvd-dsnavl02 mongod]# hostnamectl
   Static hostname: msdlvd-dsnavl02
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 69543fffeb5045b980089d047eec1653
           Boot ID: 5e38372cf85841d58cea67372fd48ea4
    Virtualization: vmware
  Operating System: Red Hat Enterprise Linux Server 7.3 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.3:GA:server
            Kernel: Linux 3.10.0-514.2.2.el7.x86_64
      Architecture: x86-64
or
[root@msdlvd-dsnavl02 mongod]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.3 (Maipo) or [root@msdlvd-dsnavl02 mongod]# cat /etc/os-release NAME="Red Hat Enterprise Linux Server" VERSION="7.3 (Maipo)" ID="rhel" ID_LIKE="fedora" VERSION_ID="7.3" PRETTY_NAME="Red Hat Enterprise Linux Server 7.3 (Maipo)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
or
[root@msdlvd-dsnavl02 mongod]# lsb_release -a LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: RedHatEnterpriseServer Description:    Red Hat Enterprise Linux Server release 7.3 (Maipo) Release:        7.3 Codename:       Maipo


I ran the rpm installer on 10.155.228.75

vi /opt/mongodb/mms/conf/conf-mms.properties


mongo.mongoUri=mongodb://10.155.228.75:25001,10.155.208.207:25001,10.155.208.169:25001


Starting Ops Manager
sudo service mongodb-mms start

Access OpsManager UI via
http://<OpsManagerHost>:8080


Click on register for first time access


To install monitoring agent:



Monitoring Agent Installation
curl -OL http://10.155.228.75:8080/download/agent/monitoring/mongodb-mms-monitoring-agent-6.1.3.436-1.x86_64.rhel7.rpm
sudo rpm -U mongodb-mms-monitoring-agent-6.1.3.436-1.x86_64.rhel7.rpm
[root@msdlva-dsnops01 mongod]# sed -i '/mmsGroupId=/d' /etc/mongodb-mms/monitoring-agent.config            
[root@msdlva-dsnops01 mongod]# sed -i '/mmsApiKey=/d' /etc/mongodb-mms/monitoring-agent.config
[root@msdlva-dsnops01 mongod]# sed -i '/mmsBaseUrl=/d' /etc/mongodb-mms/monitoring-agent.config  
[root@msdlva-dsnops01 mongod]# echo "mmsBaseUrl=http://10.155.228.75:8080" >>/etc/mongodb-mms/monitoring-agent.config  
[root@msdlva-dsnops01 mongod]# echo "mmsGroupId=5ad4d9ba8f652f6599620feb" >>/etc/mongodb-mms/monitoring-agent.config
[root@msdlva-dsnops01 mongod]# echo "mmsBaseUrl=http://10.155.228.75:8080" >>/etc/mongodb-mms/monitoring-agent.config
[root@msdlva-dsnops01 mongod]# echo "mmsApiKey=5add87fsafd613f659dfasdffdfda064f5d00061ea61fdafb37" >>/etc/mongodb-mms/monitoring-agent.config
[root@msdlva-dsnops01 mongod]# sudo systemctl start mongodb-mms-monitoring-agent.service
Once the monitoring agent runs, ops manager is able to discover any mongod running where the monitoring agent host can ping and receive a response


Once the monitoring agent runs, ops manager is able to discover any mongod running where the monitoring agent host can ping and receive a response.


Comments

Post a Comment

Popular posts from this blog

MongoDB Ops Manager Basic Installation and Configuration

Oracle Goldengate Extract, Pump, and Replicat

Oracle Goldengate Extract and Replicat within same DB from one schema to another plus some issues and fixes