This page describes how to update the Analytics Agent standalone binary and includes some steps that are relevant only if you are collecting Log Analytics data.

If you are running the Analytics Agent through the Machine Agent, see Upgrade the Machine Agent for instructions.

You should maintain a copy of the controller.xml file in addition to the analytics-agent.properties, job folder, and watermark folder. 

Preserving the watermark file and the job files is only necessary when you are collecting log data for analytics. The watermark file preserves information about the number of bytes read from the log sources by the Analytics Agent and is relevant only when Log Analytics is enabled.

File Locations

After unzipping the Analytics Agent standalone binary, the file locations are:

  • property file: <analytics-agent-home>/conf/analytics-agent.properties
  • job files: <analytics-agent-home>/conf/job
  • watermark file: <analytics-agent-home>/conf/watermark

Running Analytics Agent via the Machine Agent, the file locations are:

  • properties file: <machine-agent-home>/monitors/analytics-agent/conf/analytics-agent.properties
  • job file: <machine-agent-home>/monitors/analytics-agent/conf/job
  • watermark file: <machine-agent-home>/monitors/analytics-agent/conf/watermark 

Upgrade Procedure for Analytics Agent (Standalone Binary)

Use these steps to upgrade your Analytics Agent (standalone binary) to 20.x. 

  1. Stop the Analytics Agent.
  2. Download the 20.x Analytics Agent binary from the download site.
  3. Extract the new zip. Be sure to extract into a new empty directory or confirm that the old directories are empty before extracting the new version. Otherwise, you may encounter errors starting the Analytics Agent.
  4. (Windows only) If the Analytics Agent is installed as a Windows Service, you need to manually uninstall the old service before installing the 20.x version.
  5. Save a copy of your old analytics-agent.properties so you can copy values to the new analytics-agent.properties file. 
  6. Modify the new analytics-agent.properties file with in accordance with the steps here: Install Agent-Side Components, referring to your previous properties as needed.
  7. If you have been collecting log analytics data:
    1. Copy the old watermark file to the corresponding location in the new <analytics-agent-home> directory structure.
    2. Copy your pre-existing job files to the corresponding location in the new <analytics-agent-home> directory structure.
  8. Start the new Analytics Agent.
    You can observe that the agent starts the enabled job file, and starts tailing the logs from the last read position in the watermark file. Usually, a log message is displayed stating the start of the tailing from last read location. It matches with the watermark file. If at time printing log message gets out of sync, it can be manually validated through the UI that all logs have been tailed, and no duplicate logs have been tailed.

To move from job files to the new Consolidated Log Management source rules, see Migrate Log Analytics Job Files to Source Rules.