Try it free

ActiveGate diagnostics

  • Latest Dynatrace
  • 5-min read

You can collect diagnostic data for an ActiveGate to troubleshoot ActiveGate issues and to give Dynatrace Support the details they need to diagnose the issue.

To collect diagnostic data in the web UI, use the Fleet Management Support Archives feature.

If ActiveGate can't connect to the Dynatrace environment or doesn't start, you might need to collect diagnostic data locally from the command line. For details, see Collect diagnostic data with agctl.

Collect diagnostic data with agctl

ActiveGate version 1.333+

In cases where ActiveGate cannot connect to the Dynatrace environment or doesn't start, you might need to collect diagnostic data locally from the command line on the ActiveGate host. To do so, use the agctl command-line interface tool to collect all the necessary data and create a package that can be analyzed later.

For more information about agctl, see agctl - Command-line interface for ActiveGate.

Use agctl support-archive command

Use the agctl support-archive command to generate a support archive containing diagnostic data.

For details on the support-archive command, see Support archive.

To collect diagnostic data, run the support-archive command with the create operation.

agctl support-archive create [--directory=<PATH> --days=<NUMBER> --modules=<MODULES> --stdout]
  • The diagnostic package is written to the current working directory by default.
    • To change the target directory, use the --directory=<PATH> parameter.
    • After the successful creation of a diagnostic data file, agctl prints the path to this file.
    • Make sure that you have write permission to the target directory.
  • 30 days of data is collected by default. To change this, use the --days=<NUMBER> parameter.
  • Diagnostic data is collected from all modules by default. To change this, use the --modules=<MODULES> parameter with a comma-separated list of modules (for example, --modules=zremote,synthetic).

Use agctl support-archive command from containerized ActiveGate

You can use support-archive command to gather diagnostic data from a containerized ActiveGate using the --stdout parameter, which outputs the support archive directly and allows you to redirect it to a file on your local machine.

kubectl exec -n <namespace> <pod-name> -- agctl support-archive create --stdout 1 > ag-support-archive.zip 2 > output-logs.txt
oc exec -n <namespace> <pod-name> [-c <container>] -- agctl support-archive create --stdout 1 > ag-support-archive.zip 2 > output-logs.txt

The contents of the support archive are written to stdout, allowing them to be redirected to a ZIP file. Other output is sent to stderr to maintain the integrity of the archive file.

Windows PowerShell not supported

Make sure to use the command prompt (cmd.exe) on Windows; PowerShell isn't supported.

Collect diagnostic data with agctl for earlier versions

ActiveGate version 1.331 and earlier

For earlier versions of ActiveGate, use agctl with the deprecated create-support-archive command to collect diagnostic data.

Use deprecated agctl create-support-archive command on Linux or Windows

agctl is located in ActiveGate install directory.

If you installed ActiveGate in a custom folder, the path to agctl will be different.

agctl must be run with the same user as the ActiveGate process (by default, dtuserag).

Syntax

To collect diagnostic data, run agctl with the create-support-archive command.

sudo -u dtuserag /opt/dynatrace/gateway/agctl create-support-archive [--directory=<PATH> --days=<NUMBER> --modules=<MODULES>]
  • The diagnostic package is written to the current working directory by default.
    • To change the target directory, use the --directory=<PATH> parameter.
    • After the successful creation of a diagnostic data file, agctl prints the path to this file.
    • Make sure that dtuserag has write permission to the target directory.
  • 30 days of data is collected by default. To change this, use the --days=<NUMBER> parameter.
  • Diagnostic data is collected from all modules by default. To change this, use the --modules=<MODULES> parameter with a comma-separated list of modules (for example, --modules=zremote,synthetic).

To execute agctl, you must run the agctl.bat script, which is located in the ActiveGate install directory.

If you installed ActiveGate in a custom folder, the path to agctl.bat will be different.

agctl.bat must be run as administrator.

Syntax

To collect diagnostic data, run the agctl.bat script with the create-support-archive command.

"C:\Program Files\dynatrace\gateway\agctl.bat" create-support-archive [--directory=<PATH> --days=<NUMBER> --modules=<MODULES>]
  • The diagnostic package is written to the current working directory by default.
    • To change the target directory, use the --directory=<PATH> parameter.
    • After the successful creation of a diagnostic data file, agctl prints the path to this file.
  • 30 days of data is collected by default. To change this, use the --days=<NUMBER> parameter.
  • Diagnostic data is collected from all modules by default. To change this, use the --modules=<MODULES> parameter with a comma-separated list of modules (for example, --modules=zremote,synthetic).

Use deprecated agctl create-support-archive command from containerized ActiveGate

ActiveGate version 1.325+

You can use the --stdout parameter, which outputs the support archive directly and allows you to redirect it to a file on your local machine.

kubectl exec -n <namespace> <pod-name> -- /opt/dynatrace/gateway/agctl create-support-archive --stdout 1 > ag-support-archive.zip 2 > output-logs.txt
oc exec -n <namespace> <pod-name> [-c <container>] -- /opt/dynatrace/gateway/agctl create-support-archive --stdout 1 > ag-support-archive.zip 2 > output-logs.txt

The contents of the support archive are written to stdout, allowing them to be redirected to a ZIP file. Other output is sent to stderr to maintain the integrity of the archive file.

Windows PowerShell not supported

Make sure to use the command prompt (cmd.exe) on Windows; PowerShell isn't supported.

ActiveGate version 1.323 and earlier

For earlier versions of containerized ActiveGate, use agctl with the --directory parameter and then transfer the file using base64 encoding.

  • 30 days of data is collected by default. To change this, use the --days=<days> parameter.
  • Diagnostic data is collected from all modules by default. To change this, use the --modules=<modules-list> parameter with a comma-separated list of modules (for example, --modules=zremote,synthetic).
  1. Run the command.

    kubectl exec <pod-name> -n <namespace> -- /opt/dynatrace/gateway/agctl create-support-archive --directory=<tmp-path> [--days=<days> --modules=<modules-list>]
  2. Move the created file to the host. Use base64 to create an encoded file.

    kubectl exec <pod-name> -n <namespace> -- base64 --wrap=0 <created-file-path> > <encoded-file-host-path>
  1. Run the command.

    oc exec <pod-name> [-c <container>] -- /opt/dynatrace/gateway/agctl create-support-archive --directory=<tmp-path> [--days=<days> --modules=<modules-list>]
  2. Move the created file to the host. Use base64 to create an encoded file.

    oc exec <pod-name> [-c <container>] -- base64 --wrap=0 <created-file-path> > <encoded-file-host-path>
  1. Decode the encoded file using the appropriate Windows or Linux command.

    base64 --decode -i <encoded-file-path> > <decoded-file-path>
    $base64Data = Get-Content <encoded-file-path>
    $zipBytes = [Convert]::FromBase64String($base64Data)
    Set-Content -Value $zipBytes -Encoding Byte -Path <decoded-file-path>

What to do with the collected data

Now that the data is collected:

  • You can review the data. See Contents of diagnostic data for an overview of what's in the download.
  • You can add the data to your support ticket.

We recommend that you delete the file after use.

Contents of diagnostic data

All the collected diagnostic data is compressed into a SupportArchive<ID number> (for agctl - support_archive_<timestamp>) ZIP file that includes the following folders and files:

Folder or fileDescription

details.txt (file)

Contains general information on when and where the diagnostic data was collected and archive statistics.

config (folder)

Contains a snapshot of the ActiveGate configuration directory.

debugui (folder)

Contains a snapshot of the internal environment configuration related to the ActiveGate.

log (folder)

Contains a snapshot of the ActiveGate log directory.

autoupdater (folder)

Contains AutoUpdater service logs and RPM, Synthetic, zRemote installer modules.

install (folder)

Contains ActiveGate installer logs.

zremote (folder)

Contains zRemote, watchdog logs and agent configuration files.

synthetic (folder)

Contains ActiveGate Synthetic monitors configuration files and logs.

remotepluginmodule (folder)

Contains logs for Extensions and agent executing them.

Troubleshooting

  • Message: 'Unexpected response status code = 500, cannot create SupportArchive file.'