Administration Interface

Administration Interface

Various options are provided for administration interface as

HTTP Console – MongoDB provides a simple http interface listing information of interest to administrators. This interface may be accessed at the port with numeric value 1000 more than the configured mongod port. The default port for the http interface is 28017. To access the http interface an administrator may, for example, point a browser to http://localhost:28017 if mongod is running with the default port on the local machine. If security is configured for a mongod instance, authentication is required for a client to access the http interface from another machine.

Simple REST Interface – The mongod process includes a simple REST interface, with no support for insert/update/remove operations, as a convenience – it is generally used for monitoring/alerting scripts or administrative tasks. For full REST capabilities consider an external REST Interface such as Sleepy.Mongoose.

JSON in the simple REST interface – The simple ReST interface uses strict JSON (as opposed to the shell, which uses Dates, regular expressions, etc.). To display non-JSON types, the web interface wraps them in objects and uses the key for the type. For example:

# ObjectIds just become strings

“_id” : “4a8acf6e7fbadc242de5b4f3”

# dates

“date” : { “$date” : 1250609897802 }

# regular expressions

“match” : { “$regex” : “foo”, “$options” : “ig” }

The code type has not been implemented yet and causes the DB to crash if you try to display it in the browser.

Replica Set Admin UI – The mongod process includes a simple administrative UI for checking the status of a replica set. To use, first enable –rest from the mongod command line. The rest port is the db port plus 1000 (thus, the default is 28017). Be sure this port is secure before enabling this. Then you can navigate to http://<hostname>:28017/ in your web browser. Once there, click Replica Set Status (/_replSet) to move to the Replica Set Status page.

Apply for MongoDB Certification Now!!

https://www.vskills.in/certification/databases/mongodb-server-administrator

Back to Tutorial

Get industry recognized certification – Contact us

Menu