How to clear logs in Mid server

Pintu2
Tera Expert

Hi All,

I'm very to new to Discovery/Mid server.Can anyone let me know how to cleanup the logs as logs are taking lots of space on mid server? 

I'm very new to ITOM and I don't have any idea on this.Could anyone help me on this?

Thanks in advance.

3 REPLIES 3

adilrathore
ServiceNow Employee
ServiceNow Employee

I think you might have set the mid.log.level to debug. You can revert it back to the value of 'info' and see if the log generation comes back to normal.

 

Go to the MID Server on the ServiceNow instance and change the value of mid.log.level to info in the parameters tab.

doug_schulze
ServiceNow Employee
ServiceNow Employee

Your logs should auto-rotate out based on the setting in the mids /agent/conf/wrapper.conf .. You shouldn't have more than 10 records of agent logs that are no larger than 20mb each. Is that different for you?

tim_broberg
ServiceNow Employee
ServiceNow Employee

Three options:

  1. Send a probe with topic=SystemCommand, source=deleteLog.
    One easy way to do this is to call
        new MIDServerManage().system_msg("*", "deleteLog");
    "*" does it for all mids, or you can fill in the name of a specific mid in the first argument.
  2. Go to the logs directory and just delete the things.
  3. Ignore them. The logs are rotated. The wrapper logs never get very large and the agent logs never exceed 100MB.

    - Tim.