Starting in MongoDB 8.0, these are the only commands you may run directly on a shard. You may also run a shell helper directly on a shard if it calls one of the following commands:
abortTransaction
appendOplogNote
authenticate
autoCompact
buildInfo
commitTransaction
compact
connectionStatus
connPoolStats
createRole
createUser
currentOp
dropAllRolesFromDatabase
dropAllUsersFromDatabase
dropRole
dropUser
endSessions
flushRouterConfig
fsync
fsyncUnlock
getAuditConfig
getClusterParameter
getCmdLineOpts
getLog
getParameter
getShardMap
grantPrivilegesToRole
grantRolesToRole
grantRolesToUser
hello
hostInfo
invalidateUserCache
killAllSessions
killAllSessionsByPattern
killCursors
killOp
killSessions
listCommands
lockInfo
logApplicationMessage
logout
logRotate
ping
profile
replSetAbortPrimaryCatchUp
replSetFreeze
replSetGetConfig
replSetGetStatus
replSetMaintenance
replSetReconfig
replSetResizeOplog
replSetStepDown
replSetSyncFrom
revokePrivilegesFromRole
revokeRolesFromRole
revokeRolesFromUser
rolesInfo
rotateCertificates
serverStatus
setParameter
shardingState
startSession
top
updateRole
updateUser
usersInfo
whatsmyuri
Back
Troubleshoot Sharded Clusters
Next
Storage