OS Inventory Management

This page describes OS Inventory Management. For information on setting up and using OS Inventory Management, see Viewing operating system details.

Use OS Inventory Management to collect operating system and package information that is stored as guest attributes on the Compute Engine metadata server. You can then query these guest attributes to retrieve information about the operating system that is running on a VM instance.

When to use OS Inventory Management

OS Inventory Management can be used to complete the following tasks:

  • Identifying virtual machines that are running a specific version of an operating system.
  • Viewing packages that are installed on a VM instance.
  • Generating a list of package updates that are available for each VM instance.
  • Identifying missing packages, updates, or patches for a VM instance.

How OS Inventory Management works

When OS Inventory Management is enabled, the OS Configuration agent runs an inventory scan to collect data, and then sends this information to the metadata server and various log streams. This scan runs every 10 minutes on the VM instance.

How the data is collected

For Linux instances, the OS Configuration agent runs on the instance and parses the /etc/os-release , or the equivalent file for the Linux distribution to gather operating system details. The OS Configuration agent also uses package managers such as apt-get, yum, or GooGet to collect information about the installed packages and available updates for the instance.

For Windows instances, the OS Configuration agent uses the system libraries to collect the OS information details. The installed packages and available updates are collected by querying the Windows Update Agent libraries.

Where the data is stored

Inventory data is stored as guest attributes under the guestInventory namespace. The contents for the installed packages and package updates are compressed using gzip and then base64 encoded to save space.

Logging

During the collection and storage of data, the OS Configuration agent writes activity logs to the various log streams on Compute Engine. These include:

  • The serial port
  • System logs - Windows event log and Linux syslog
  • Standard streams - stdout
  • Stackdriver Logging logs - These logs are only available if Stackdriver Logging is enabled on the VM instance.

Information provided by OS Inventory Management

Operating system information

OS Inventory Management can provide the following information about the operating system that is running on your VM instance:

  • Hostname
  • LongName - The detailed operating system name. For example, Microsoft Windows Server 2016 Datacenter.
  • ShortName - The short form of the operating system name. For example, Windows.
  • Kernel version
  • OS architecture
  • OS version
  • OS Configuration agent version
  • Last updated - A timestamp of the last time the agent successfully scanned the system and updated the guest attributes with OS Inventory data.

Installed package information

The following table summarises the installed package information that OS Inventory Management provides.

Operating system Package manager Available fields
Linux and Windows Server Installed package information is available from the following package managers:
  • RPM for Red Hat Enterprise Linux (RHEL)
  • DEB for Debian and Ubuntu
  • GooGet for Windows Server
  • Gem for Ruby
  • Pip for Python
For each installed package the following information is provided:
  • Name of the package
  • Architecture
  • Version
Windows Server Windows update agent The following fields are listed for the Windows Update Agent packages:
  • Title
  • Description
  • Categories
  • CategoryIDs1
  • KBArticleIDs
  • SupportURL
  • UpdateID1
  • RevisionNumber1
  • LastDeploymentChangeTime
Windows Server Windows Quick Fix Engineering updates The following fields are listed for the QuickFixEngineering packages:
  • Caption
  • Description
  • HotFixID
  • InstalledOn

1This field is hidden in the default gcloud compute instances os-inventory describe command-line output. To view this field you must view the output in the JSON format. To view the output in JSON format, append the --format=JSON to the gcloud command. For more information about output formatting, review gcloud topic formats.

Available package updates information

The following table summarises the package update information that OS Inventory Management provides.

Operating system Package manager Available fields
Linux and Windows Server Package update information is available from the following package managers:
  • Yum for Red Hat Enterprise Linux (RHEL)
  • Apt for Debian and Ubuntu
  • GooGet for Windows Server
  • Gem for Ruby
  • Pip for Python
For each package update that is available the following information is provided:
  • Name of the package
  • Architecture
  • Version
Windows Server Windows update agent The following fields are listed for the Windows Update Agent packages:
  • Title
  • Description
  • Categories
  • CategoryIDs1
  • KBArticleIDs
  • SupportURL
  • UpdateID1
  • RevisionNumber1
  • LastDeploymentChangeTime

1This field is hidden in the default gcloud compute instances os-inventory describe command-line output. To view this field you must view the output in the JSON format. To view the output in JSON format, append the --format=JSON to the gcloud command. For more information about output formatting, review gcloud topic formats.

What's next

Var denne siden nyttig? Si fra hva du synes:

Send tilbakemelding om ...

Compute Engine Documentation