logRotate command issued on secondary node through connection string from pymongo rotating primary node’s log. How to rotate the secondary mongodb log?
My current approach:
conn = pymongo.MongoClient(port=dbport)
its localhost - primary node is on another server
replicaset has primary, secondary, arbiter
mongodb server 4.2.2
By default the client driver will automatically discover the replica set and connect to the primary. To connect directly to the node you will need to add the parameter directConnection=True as a URI option or keyword argument.