how to run db.adminCommand() using pymongo for mongodb 3.6
On mongo shell:
db.adminCommand({getParameter: 1, logLevel: 1})


{ &quot;logLevel&quot; : 0, &quot;ok&quot; : 1 }

On python:
from pymongo import MongoClient

server = 'localhost'

port = 27017

client = MongoClient(server, port)

print(client.admin.command(({'getParameter': 1, 'logLevel': 1})))


{'logLevel': 0, 'ok': 1.0}