This topic describes updating 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 Standalone Machine Agent, See Upgrade the Standalone Machine Agent for instructions. Note: 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. Job files contain the configuration for pre-4.3 log sources. |
After unzipping the Analytics Agent standalone binary, the file locations are:
- property file:
- job files:
- watermark file:
Running Analytics Agent via the Standalone Machine Agent, the file locations are:
- properties file:
- job file:
- watermark file:
Upgrade Procedure for Analytics Agent (Standalone Binary)
Use these steps to upgrade your Analytics Agent (standalone binary) to 4.5.
- Stop the Analytics Agent.
- Download the 4.5 Analytics Agent binary from the download site.
- 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.
- (Windows only) If the Analytics Agent is installed as a Windows Service, you need to manually uninstall the old service before installing the 4.5 version.
- Save a copy of your old analytics-agent.properties so you can copy values to the new analytics-agent.properties file.
- Modify the new
analytics-agent.properties file with in accordance with the steps here: Installing Agent-Side Components, referring to your previous properties as needed.
- If you have been collecting log analytics data:
- Copy the old watermark file to the corresponding location in the new <analytics-agent-home> directory structure.
- Copy your pre-existing job files to the corresponding location in the new <analytics-agent-home> directory structure.
- 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.