Unable to start mongod when setting operationprofiling in conf file

I have set the following under mongod.yaml file to answer on lab question - Logging to a Different Facility

file located on /etc

#operationProfiling:
operationProfiling:
mode: slowOp
slowOpThresholdMs: 50

getting the following error

vagrant@m103:/etc$ vagrant@m103:/etc$ mongod --config /etc/mongod.yaml
Unrecognized option: operationProfiling
try ‘mongod --help’ for more information
vagrant@m103:/etc$

1 Like

May be indentation problem
Why two entries are there for this param?You can remove commented ones
Also config file need not be named .yaml
Under operationProfiling make sure below two entries are 2-3 spaces to the right
mode: slowOp
slowOpThresholdMs: 50

after changing the content to ( added spaces as suggested )

operationProfiling:
mode: slowOp
slowOpThresholdMs: 50

was able to start mongod

Thanks

Hi @shlomi_06088,

I’m glad your issue got resolved. If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Untitled
had applied correct setting but still getting below error

Untitled
Please help

Hi @ANSHUL_65600,

Since this is a Lab question, I have blurred it. Please check your inbox for further instructions.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Please Help still not working

Hi @ANSHUL_65600,

Responded. Please check.

Thanks,
Shubham Ranjan
Curriculum Support Engineer