• Home
  • How to use Dynatrace
  • Log Monitoring
  • Log ingest & process
  • Add log files manually

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.

Adding log file to process group

To manually add a log file to a process group

  1. In the Dynatrace menu, select Technologies and processes and a process group.
  2. From the process group page, select the process instance for which you want to add a new log file.
  3. In the Log files section of the page, select the Configure more log files link.
    Alternatively, look for the No log sources detected section if no log files are associated with the process.
  4. On the Process group settings page, select the Log monitoring tab.
  5. Select Add new log for monitoring.
  6. Type the file path of the log file to be associated with this process group. Only absolute paths are allowed.
    • Check out the requirements to the logs paths to make sure they are supported.
    • Make sure you enable monitoring of the added log file(s).
  7. Select Save.

Windows event logs

Standard Windows event logs are already automatically detected, so you don't have to manually add the following:

  • Windows Security Log
  • Windows Application Log
  • Windows System Log
  • IIS Event Logs

To manually add a custom Windows event log file to a process

  1. In the Dynatrace menu, select Hosts.

  2. Select the host that contains the Windows event log file.

  3. From the Processes section of the overview of the host page, select the process for which you want to add a new log file.
    Optionally, in the Dynatrace menu, go to Technologies and processes, select a process group, and then, from the process group page, select the process instance for which you want to add a new log file.

  4. In the Log files section, select Add more.

  5. On the Manually added process logs page, select Add new log for monitoring

  6. Provide the log name followed by the .evtx file extension.
    You can use the built-in Windows Event Viewer to find the custom log name. Make sure that you provide the full path.

    Example

    As in the following example, you can display the log name by right-clicking on the chosen event log and selecting Properties:

    Windows event viewer properties screen.

    Copy the Full Name:

    Windows viewer log properties.

  7. Select Save.

Considerations for adding text log files manually

Dynatrace supports log files that were updated (written to) in the last 7 days AND meet at least one of the following criteria:

  • Files are located in a directory called log or logs (up to 2 levels) or /var/log/.
    OK (level 1):
    c:\...\logs\custom.txt
    c:\...\log\custom.txt

    OK (level 2):
    c:\...\logs\app1\custom.txt
    c:\...\log\app2\custom.txt

    NOT OK (level 3 and above):
    c:\...\logs\app1\app11\custom.txt
    c:\...\log\app2\app22\custom.txt

  • Custom log path must specify files, not a directory:
    NOT OK:
    /var/log/customdir/

  • Custom log paths files must not start or end with a wildcard ( * )
    NOT OK:
    /var/log/customdir/*
    /var/log/customdir/file*
    /var/log/customdir/*.log

  • Files have the extension .log, -log, _log (for example, apache.log, apache.myapp-log, apache.myapp_log)

  • Every file that has other extension, such as .txt, is supported if its names contains the .log, -log, or _log prefix that is preceded by at least one character or symbol (for example, apache.log.txt, apache-log.txt, or apache_log.txt)
    Note: The log.txt alone file is not accepted (unless placed in the log or logs directory).

  • File name is catalina.out

Custom log paths

Remember that, after you configure custom log paths, make sure the log files are added to log storage. See, Log sources and storage

Additionally:

  • Only absolute file paths are supported:
    • Unix: Path must begin with /.
      Paths within the following folders are not supported:
    plaintext
    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:
    plaintext
    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 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:
    /var/lib/dynatrace/oneagent/agent/config/ruxitagentloganalytics.conf

    On Windows:
    %PROGRAMDATA%\dynatrace\oneagent\agent\config\ruxitagentloganalytics.conf

Use template

If your OneAgent installation, freshly installed or upgraded, does not have the ruxitagentloganalytics.conf file, use ruxitagentloganalytics.conf.template as a template and create your own ruxitagentloganalytics.conf file. Next, copy the ruxitagentloganalytics.conf file to the following directory:

  • Linux: /var/lib/dynatrace/oneagent/agent/config/
  • Windows: %PROGRAMDATA%\dynatrace\oneagent\agent\config\