Add log files manually

Dynatrace allows you to add specific log files manually in instances where the files aren't discovered automatically. You only need to add one log path at the process-group level to cover all processes within the group across all monitored hosts.

To manually add a log file to a process group:

  1. Open the left-hand navigation menu and select Hosts.
  2. Select a host.
  3. From the Processes section of the page, select the process for which you want to add a new log file.
  4. In the Log files section of the page, click the Configure more log files link.
    Alternatively, look for the No log files section if no log files are associated with the process.
  5. On the Process group settings page, select the Log monitoring tab.
  6. Click Add new log file for monitoring.
  7. Type the file path of the log file to be associated with this process group. Only absolute paths are allowed.
  8. Click Save.

Considerations for adding log files manually

Dynatrace supports log files that meet at least one of the following criteria:

  • Files are located in a directory called log or logs (limited up to 2 levels) or /var/log/.

OK:
C:\Program Files\MyApp\logs\aaa.txt
/var/log/app/other/out/bbb.out

NOT OK:
C:\Program Files\MyApp\logs\other\out\ccc.txt

  • Files have the extension .log or .evt (for example, apache.log).
  • File names end with [.-_]log (for example, apache_log.txt, apache.log.txt, or apache-log.txt).
  • The file must be at least 0.5 KB's in size AND must be updated (written to) in the last 7 days.

Additionally:

  • Only absolute file paths are supported:

    • Unix: Path must begin with /.
      Paths within the following folders are not supported:
      etc
      boot
      proc
      dev
      bin
      sbin
      lib
      usr
      .ssh
      
    • Windows: Path must begin with drive letter (for example, C:\).
      Paths within the following folders are not supported:
      windows
      winnt
      
  • Manually added log files affect all processes on all hosts belonging to the configured process group.

  • To add log files located in a container:

    1. Configure the container so that the log file within the container is written to a disk.
    2. Point the OneAgent to this location by defining the absolute path to where the container is to write the log files.
  • You can add a set of files in the folder by using a wildcard.
    For example, /var/log/apache/access-*.log will report all files separately.

  • You can add numbered rotating-log filesets by using the hash character (#).
    For example, /var/log/error-#.log will match error-1.log, error-2.log, etc., and report the fileset as a single error-#.log file.

  • You can globally disable the option to configure custom log files by setting:
    AppLogRemoteConfiguration = false
    On Linux:

    • Dynatrace OneAgent versions 103 and later:
      /var/lib/dynatrace/oneagent/agent/config/ruxitagentloganalytics.conf

    • Dynatrace OneAgent versions 102 and earlier:
      /var/lib/ruxit/agent/config/ruxitagentloganalytics.conf

    On Windows:

    • Dynatrace OneAgent versions 103 and later:
      C:\ProgramData\dynatrace\oneagent\agent\config\ruxitagentloganalytics.conf

    • Dynatrace OneAgent versions 102 and earlier:
      C:\ProgramData\ruxit\agent\config\ruxitagentloganalytics.conf