How to clear DatahubMongo DB and MongoDBforLog

Creation date: 11/08/2022 13:31    Updated: 11/08/2022 13:31   #clear log #datahubmongodb #mongodbforlog
Question:

Sorry for re-raise for this issue, we worry wrong truncate the data, we found email archive from technical consultant Honeywell (KokKeong.Cheong@honeywell.com) there is another solution to clear log trough timer rule, we follow default setting  LOG_RETENTION_DAYS under System Config module, we try to do immediately run timer rule but log Mongodb still not yet clear. Please kindly help to advise how to clear logs.






Answer:

Investigation:

To truncate/delete from MongoDB, user needs to access through mongo shell console to do so.

The credential for MongoDB can be found in FE/BE server under /data/fluxwms-configs/wmsV5Config.properties file.

The details should be as below table:


Authentication Database

User Name

datahubmongo

datahubmongo

mongodbforlog

mongodbforlog

This is how to remove.

For collections under datahubmongo, you may drop them to clear.

*** For collections under mongodbforlog, you will need to remove documents, cannot drop.

The drop collection (e.g OJV_CML.SYS_DATAHUB_LOG_INFO) under datahubmongo will trigger system to create automatically for the collection. This is only for datahubmongo but not for mongodbforlog.



Investigation:

Asking from customer which MongoDB log is not deleted? The above steps are only for WMS MongoDB.
Files