Automating the Configuration of Log Insight

Now that you know how to automate the deployment of Log Insight, you are probably wondering how to automate the configuration of Log Insight. Automating the configuration of Log Insight is a little harder because Log Insight does not have a configuration API today and because by default SSH is disabled until the root password is set. In addition, the root password cannot be set through OVF properties today.

So how do you automate the configuration of Log Insight?

Disclaimer

WARNING: This is not officially supported by VMware, use at your own risk. More specifically, the local filesystem and especially /storage should not be modified on the Log Insight VA. Doing so may result in Log Insight being unable to start or even permanent data loss.

I have had this post queued up for awhile and just learned yesterday that Caleb did a post on this topic. I would encourage you to take a look at his post here.

Create a template

  1. Deploy and power on Log Insight
  2. Set the root password on the console
  3. Power off the VM

Create a configuration file

IMPORTANT: This step is Log Insight version specific. If you plan to automate the deployment of Log Insight 1.0 and 1.5, you should create two separate configuration files as the format of the configuration file may change between versions.

  1. Deploy and power on Log Insight
  2. Set the root password on the console
  3. Navigate to the HTML 5 interface and perform the one-time configuration (skip the vCenter Operations Manager step)
  4. Run the following command to grab the configuration file generated from the VA
  5. Power off and delete the VM

Configure a Log Insight deployment

  1. Deploy Log Insight using the template created above
  2. Copy the configuration file generated to the deployed instance
  3. Copy a license key to the deployed instance
  4. Copy any content pack to be installed (optional)
  5. Configure NTP
  6. Restart the Log Insight process so the changes take effect
  7. Set the admin password
  8. Add users to postgres database (optional)

In scripted form this would look like:

Notes:

  • To ease automation (at the cost of security) you can use sshpass to handle authentication instead of writing an expect script
  • To ease automation (at the cost of security) you can disable host key checking
  • The li-reset-admin-passwd.sh script by default generates a random password. If you wish to set the password then set the environment variable ADMINPASSWORD before running the command

An example of a scripted form given the above notes would be:

© 2014, Steve Flanders. All rights reserved.

Leave a Reply