I need a simple check for identifying that I am connected to a MongoDB config server.
I can check the process to differentiate between mongod and mongos:
> db.serverStatus().process; mongod
Now I make an assumption that config server is the one without a replica set name, but it would not always hold true. I check that below returns a NULL value.
What is a better way to identify config server from mongod in a simple manner? This would be useful for custom prompt function based on the connection.