Moogsoft AIOps services generate log files to report on their activity and provide and to serve as an audit trail, diagnostic device, or security measure. 

For information on the Logger MooBot module, click here.

Log file locations

AIOps service log files are located as follows:


  • Location of log files:

  • The primary log file is catalina.out


  • Location of log files:
  • The primary log file is error_log


  • Default location of log files (unless stated otherwise in the LAM information):


  • Location of log file:


  • Location of log file:


  • Default location of log file:


  • Location of log files:

Changing log levels

Set the level of logging for AIOps services as explained below. Available log levels are ALL, INFO, WARN, DEBUG and NONE.


  • Various logging level properties can be set in the following file:
  • Set the log levels of the Moog AIOps servlets such as graze, moogsvr, moogpoller and toolrunner in the following file: 
    Set the loglevel property as follows: 

  • Restart the apache-tomcat service with the following command:

    service apache-tomcat restart


  • In the following file:
    Set the LogLevel property as follows:

    LogLevel debug
  • Restart the nginx service with the following command:

    service nginx restart 


  • In the following file:
    /etc/init.d/<lamd_name> (for example, socketlamd, trapdlamd)
    Set the the LOG_LEVEL property as follows:

  • Restart the LAM with the following command:

    service <lamd_name> restart


  • In the following file:
    Set the LOG_LEVEL property as follows:

  • Restart the moogfarmd service with the following command:

    service moogfarmd restart 


  • Logging is at the highest level by default. To remove a warning from the logs add the following to /etc/my.cnf

    log_warnings = 0
  • Restart the mysqld service with the following command:

    service mysqld restart


Log rotation

Log data generated by AIOps services such as moogfarmd and LAMs are written to log files. Log data for each of these files is partitioned into separate files (rotated), either if the log file size reaches 500MB or daily (whichever occurs first). The partitioned log data files are compressed into GZ (gzip format) files, which are date-stamped with their filename. Rotated log files are retained for 40 days before being purged.

Log rotation prevents the size of log files becoming unmanageable and prevents log data loss when restarting AIOps. Log rotation parameters are configurable (see below).

Log rotation in Moogsoft AIOps is handled by the unix logrotate utility.

Example rotated log files

For the moog_farmd service, in location:


In the above file list, moogfarmd.log is the current log file. The other three .gz files are the rotated log files for the last three days, date-stamped by their filename.

Configuring log file rotation

Log rotation of *.log files in the /var/log/moogsoft directory is controlled by a cron job that runs once per hour, on the hour:

[root@ldev04 moogsoft]# crontab -l
0	*	*	*	* /usr/sbin/logrotate /etc/logrotate.d/moog-logrotate
*	*	*	*	* /usr/share/moogsoft/bin/utils/moog_indexer -b 1000 -t 5
0	*	*	*	* /usr/share/moogsoft/bin/events_analyser --incremental
0	3	*	*	0 /usr/share/moogsoft/bin/events_analyser

To set the log file size limit and/or retention period, edit file /etc/logrotate.d/moog-logrotate and set the size and maxage properties appropriately.

To set the frequency at which log rotation occurs edit the logrotate entry in crontab (using command crontab -e) as per standard cron notation.