Dynatrace Network Analyzer Documentation

Skip to end of metadata
Go to start of metadata

New

Icon

This feature is new in DNA 12.5.

Use the Agent Commander CLI (command line interface) version to manage DNA agents and captures from the command line and scripts.

Using Agent Commander CLI

  1. Get the latest Agent Commander CLI (command-line interface) zip file from the Downloads for Dynatrace Network Analyzer page.
  2. Copy the file to a Windows machine and unzip it.
  3. Start a command line in Windows.
  4. Run it.
    If you don't use parameters:
    C:\DNAAgentCommanderCLI>DNAAgentCommanderCLI.exe
    to get a list of examples, or refer to the help below.
  5. When you have your captures, open them with your DNA console installation.

Notes and tips:

  • Boolean values can be specified by 0/1, true/false, or yes/no, and they are case-insensitive. A non-matching value will be interpreted as false.
  • To make a series of captures (for example, capture 30 seconds of traffic every hour), create a script that incorporates calls to DNAAgentCommanderCLI.exe, and then add the script to the Windows Task Scheduler. 

Command syntax and examples

info

To shake hands with an agent and get the agent version and OS type, issue the info command without authentication.

DNAAgentCommanderCLI.exe info --agentip dnaagenthostname

To get for detailed system information from an agent, issue the info command with the agent IP address and authentication details (username and password).

DNAAgentCommanderCLI.exe info --agentip dnaagenthostname --username dnauser --password dnapassword

getnics

To get a list of available network interfaces, issue the getnics command with the agent IP address and authentication details (username and password).

DNAAgentCommanderCLI.exe getnics --agentip dnaagenthostname --username dnauser --password dnapassword

getpmode

To get the promiscuous mode value for an agent, issue the getpmode command with the agent IP address and authentication details (username and password).

DNAAgentCommanderCLI.exe getpmode --agentip dnaagenthostname --username dnauser --password dnapassword

setpmode

To set the promiscuous mode value for an agent, issue the setpmode command with the agent IP address and authentication details (username and password), and set the actual value with pmodeenabled set to true or false.

DNAAgentCommanderCLI.exe setpmode --agentip dnaagenthostname --username dnauser --password dnapassword --pmodeenabled true

startcapture

To start a capture on a NIC using the default settings, issue the startcapture command with the agent IP address and authentication details (username and password), and the name of the NIC.

DNAAgentCommanderCLI.exe startcapture --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname"

To start a capture with full capture parameters, you have the following additional parameter options:

  • nicname
    The name of the NIC in quotes.
  • filter
    The BPF filter expression. If filtername is not specified, the filter value is used as a name.
  • filtername
    The name of the filter in quotes.
    • This should be a user-friendly description of the filter.
    • This does not relate to any filter saved in the DNA console. This filters are independent.
  • buffersizekb
    The size of the capture buffer in KB.
  • diskcaching
    Whether to use disk caching (Boolean).
  • allowgaps
    Whether to allow gaps (Boolean).

Example:

DNAAgentCommanderCLI.exe startcapture --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname" --filter "icmp"  --filtername "icmp filter" --buffersizekb 1024 --diskcaching 1 --allowgaps false

stopcapture

To stop an active capture, issue the stopcapture command with the agent IP address and authentication details (username and password), and the name of the nic.

DNAAgentCommanderCLI.exe stopcapture --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname"

getnicproperties

To get capture properties for the selected NIC, issue the getnicproperties command with the agent IP address and authentication details (username and password), and the name of the NIC.

DNAAgentCommanderCLI.exe getnicproperties --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname"

getnicstats

To get capture statistics for the selected NIC, issue the getnicstats command with the agent IP address and authentication details (username and password), and the name of the NIC.

Example: Get capture statistics for a NIC.

DNAAgentCommanderCLI.exe getnicstats --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname"

retrievetrace

To retrieve a capture from an agent, issue the retrievetrace command with the agent IP address and authentication details (username and password), and the name of the NIC.

In this example, we use appendtimestamp to add a timestamp to the file name.

DNAAgentCommanderCLI.exe retrievetrace --agentip dnaagenthostname --username dnauser --password dnapassword --nicname "actualnicname" --saveas "filenametogiveit.opx" --appendtimestamp

 

  • No labels