Log Insight 4.3: Agent Auto-Upgrade

Log Insight has featured a Tech Preview of the agent auto-upgrade feature for the last two releases. I am happy to announce that as of Log Insight 4.3, this feature is now fully supported. Read on to learn more!

What is Agent Auto-Upgrade?

As the name implies, this feature automatically upgrade agents when the server has a newer version of the agent binaries.

Agent Auto-Upgrade Requirements

In order for agent auto-upgrade to work and be supported, the following requirements must be met:

  • Server version 4.3 or newer
  • Agent version 4.3 or newer (while it works from version 3.6, support starts at 4.3)
  • Agent auto-update option set to yes (default if running agent version 4.3 or newer
  • Agent package is not bin (Linux only)

Client-side Configuration

By default, if you install or upgrade to the 4.3 version of the agent the auto-upgrade feature is enabled. For freshly deployed agents, you can confirm this by checking the liagent.ini file:
For upgraded instances, the existing liagent.ini file is not modified. However, if you check the logs, you can confirm that if the auto-upgrade option is missing then the agent automatically enables it:

# grep update.auto_update /var/log/loginsight-agent/*
./liagent_2017-01-10_71.log:2017-01-10 23:55:50.134277 0x00007fbe37a81700 <trace> Config:337         | Configuration key update.auto_update is not specified. Using default: no
./liagent_2017-01-20_72.log:2017-01-20 21:42:57.134443 0x00007f61e273f700 <trace> Config:337         | Configuration key update.auto_update is not specified. Using default: no
./liagent_2017-01-20_72.log:2017-01-20 21:44:53.894919 0x00007f61e273f700 <trace> Config:337         | Configuration key update.auto_update is not specified. Using default: no
./liagent_2017-01-20_72.log:2017-01-20 21:44:57.928427 0x00007f61e273f700 <trace> Config:337         | Configuration key update.auto_update is not specified. Using default: no
./liagent_2017-02-15_74.log:2017-02-15 09:18:18.304595 0x00007fc7f05cf700 <trace> Config:337         | Configuration key update.auto_update is not specified. Using default: yes

Note: The means if you do not want an agent to auto-upgrade then you must explicitly disable it in the liagent.ini file. Also note that even if the feature is enabled client-side, it will only get called if the feature is enabled server-side as well.

Server-side Configuration

From Log Insight, navigate to the /admin/agents page. Next, enable the auto-upgrade toggle:

Now the next time the server is upgrade, if it contains a newer version of the agent then all 4.3 or newer agents will get upgraded if the client-side configuration is enabled.

Q&A

  • Can you selectively upgrade agents? No. It is all or nothing. You can prevent agents from being upgraded by disabling the configuration client-side
  • What happens if you attempt to upgrade 3.6 or newer agents using this method? It should work, but it is not supported and may cause issues. This is not recommended. You should manually upgrade to 4.3 especially in production environments.
  • What happens if the upgrade fails? The upgrade should not fail, but if it does the updater will try to recover. In worst case, you could check the logs client-side to see what is going on. File a bug if this happens (it should not).
  • Does this work for both Windows and Linux versions of the agent? Yes. It does not work for the bin package.
  • How long after the server updated is the agent updated? Typically within 5 minutes, but could be up to 30 minutes.
  • Do all agents upgrade at the same time? Depends on the polling interval — all should update within the 5 to 30 minute time frame.

© 2017, Steve Flanders. All rights reserved.

3 comments on “Log Insight 4.3: Agent Auto-Upgrade

Hi Steve,
The vROps appliances have auto upgrade set to yes and it downloads the file to /tmp but does not install it.
– Is upgrading the liagent on the vROps appliances supported?
– If yes should i just run the install manually, vROps 6.4 is running version 4 of the agent.
Thanks
Hywel

Hey Hywel — agent auto-upgrade was not supported until version 4.3 so that is likely why the upgrade is not working. Yes, you can upgrade the liagent manually from the CLI.

Hywel says:

Thank you steve

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top