MongoDB startup options, REST and HTTP admin interface

MongoDB has a built-in HTTP based admin interface and a REST based light weight operations interface which can be started with the MongoDB server start up.

When starting MongoDB, just specify the flags

The MongoDB server will start with a web server listening on 28017 (1000 greater than the native init port on which the MongoDB starts by default i.e. 27017)

mongodb –httpinterface –rest

D:\MongoDB3\bin>mongod –httpinterface –rest
2015-08-25T15:28:18.015+0530 I CONTROL  Hotfix KB2731284 or later update is installed, no need to zero-out data files
2015-08-25T15:28:18.033+0530 I JOURNAL  [initandlisten] journal dir=D:\data\db\journal
2015-08-25T15:28:18.034+0530 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-08-25T15:28:18.132+0530 I JOURNAL  [durability] Durability thread started
2015-08-25T15:28:18.134+0530 I JOURNAL  [journal writer] Journal writer thread started
2015-08-25T15:28:18.308+0530 I CONTROL  [initandlisten] MongoDB starting : pid=7380 port=27017 dbpath=D:\data\db\ 64-bit host=MYHOST
2015-08-25T15:28:18.309+0530 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-08-25T15:28:18.310+0530 I CONTROL  [initandlisten] db version v3.0.4
2015-08-25T15:28:18.312+0530 I CONTROL  [initandlisten] git version: 0481c958daeb2969800511e7475dc66986fa9ed5
2015-08-25T15:28:18.314+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1m-fips 19 Mar 2015
2015-08-25T15:28:18.316+0530 I CONTROL  [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack=’Service Pack 1′) BOOST_LIB_VERSION=1
2015-08-25T15:28:18.318+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2015-08-25T15:28:18.320+0530 I CONTROL  [initandlisten] options: { net: { http: { RESTInterfaceEnabled: true, enabled: true } } }
2015-08-25T15:28:18.332+0530 I NETWORK  [websvr] admin web console waiting for connections on port 28017
2015-08-25T15:28:18.335+0530 I NETWORK  [initandlisten] waiting for connections on port 27017

Just point your browser to http://localhost:28017/ to see the admin console in action



#mongodb, #nosql