Skip to content

Releases: logicmonitor/lm-cloud-resource-inventory

v2.0.0

23 Dec 20:18

Choose a tag to compare

v2.0.0

Version 2.0.0 Updates - A complete rewrite of the LM Cloud Resource Inventory tool.

Overview

This release completely rewrites the tool from PowerShell scripts to a unified Python-based CLI supporting all four cloud providers (AWS, Azure, GCP, OCI) with a consistent user experience.

Installation

# From PyPI
pip install lm-cloud-inventory

# From source
git clone https://github.com/logicmonitor/lm-cloud-resource-inventory.git
cd lm-cloud-resource-inventory
pip install .

Quick Start

lmci run -p aws -o aws_summary.csv
lmci run -p azure -o azure_summary.csv
lmci run -p gcp -o gcp_summary.csv
lmci run -p oci -o oci_summary.csv

Why This Rewrite?

The previous PowerShell implementation had several limitations:

Issue v1 (PowerShell) v2 (Python)
Provider support AWS, Azure only AWS, Azure, GCP, OCI
Performance Slow (iterates regions/services) Fast (cloud-native APIs)
Permissions Sometimes required elevation Read-only only
License calculation Coupled with collection Decoupled & configurable
Installation PowerShell-dependent pip install

What's New

Unified CLI

All providers use the same command structure:

# Full command
lm-cloud-inventory run -p <provider> [options]

# Short alias
lmci run -p <provider> [options]
Option Description
-p, --provider Cloud provider: aws, azure, gcp, oci
-o, --output Output CSV file
-d, --detailed Detailed breakdown by region
--profile AWS CLI profile name
-s, --subscription Azure subscription ID (repeatable)
--project GCP project ID
--compartment OCI compartment OCID
-v, --verbose Debug logging

Cloud-Native APIs

Provider API Used Performance
AWS Resource Explorer ~2-5 min (all regions in one call)
Azure Resource Graph ~1-2 min
GCP Cloud Asset Inventory ~1-2 min
OCI Search Service ~1 min

Hybrid Resource Units

Calculates LogicMonitor Hybrid Resource Units automatically:

TOTALS
----------------------------------------
  IaaS                        150
  PaaS                        350
  Non-Compute                 500
----------------------------------------
  HYBRID RESOURCE UNITS       200
    (IaaS: 150 + PaaS: ceil(350/7))

Decoupled Architecture

  • Collection: Gathers raw inventory → inventory.json
  • Calculation: Applies license rules → summary.csv
  • Configuration: Resource mappings in config/resource_mappings.json

This allows updating license rules without code changes.

Clear Logging

[13:45:02] Authenticating via: DefaultAzureCredential
[13:45:03] Found 3 subscriptions: Production, Staging, Dev
[13:45:15] Collected 47 inventory records from Azure
[13:45:15] Calculating license requirements...

Output Formats

Summary CSV

Provider,Account,Category,ResourceType,Region,Count
aws,123456789012,IaaS,ec2:instance,us-east-1,42
aws,123456789012,PaaS,lambda:function,us-east-1,28

TOTAL,,IaaS,,,42
TOTAL,,PaaS,,,28
TOTAL,,Non-Compute,,,125
TOTAL,,HYBRID UNITS,,,46

CLI Summary

======================================================================
LICENSE REQUIREMENT SUMMARY
======================================================================

AWS
----------------------------------------
  IaaS                         42
    ec2:instance                   42
  PaaS                         28
    lambda:function                28

======================================================================
TOTALS
----------------------------------------
  IaaS                         42
  PaaS                         28
  Non-Compute                 125
----------------------------------------
  HYBRID RESOURCE UNITS        46
======================================================================

Breaking Changes

  • ⚠️ PowerShell scripts are deprecated (still in repo for reference)
  • ⚠️ AWS requires Resource Explorer to be enabled
  • ⚠️ Credential setup uses cloud-native credential chains

AWS Resource Explorer Limitations

The following services are not indexed by AWS Resource Explorer:

Service Notes
CloudSearch Domain
MediaConnect Flow
MediaConvert Queue
OpsWorks Stack
Q Business Application
QuickSight Dashboard only
Simple Workflow (SWF) Domain
Application Migration Service Source Server
ElasticTranscoder Pipeline

Contact your LogicMonitor representative for manual inventory if you use these services significantly.


Documentation


Feedback

Please report issues or feedback directly within Github issues for assistance.

v2.0.0-rc1

23 Dec 20:09

Choose a tag to compare

v2.0.0-rc1 Pre-release
Pre-release

v2.0.0-rc1

Release Candidate 1 - A complete rewrite of the LM Cloud Resource Inventory tool.

Overview

This release completely rewrites the tool from PowerShell scripts to a unified Python-based CLI supporting all four cloud providers (AWS, Azure, GCP, OCI) with a consistent user experience.

Installation

# From PyPI
pip install lm-cloud-inventory

# From source
git clone https://github.com/logicmonitor/lm-cloud-resource-inventory.git
cd lm-cloud-resource-inventory
pip install .

Quick Start

lmci run -p aws -o aws_summary.csv
lmci run -p azure -o azure_summary.csv
lmci run -p gcp -o gcp_summary.csv
lmci run -p oci -o oci_summary.csv

Why This Rewrite?

The previous PowerShell implementation had several limitations:

Issue v1 (PowerShell) v2 (Python)
Provider support AWS, Azure only AWS, Azure, GCP, OCI
Performance Slow (iterates regions/services) Fast (cloud-native APIs)
Permissions Sometimes required elevation Read-only only
License calculation Coupled with collection Decoupled & configurable
Installation PowerShell-dependent pip install

What's New

Unified CLI

All providers use the same command structure:

# Full command
lm-cloud-inventory run -p <provider> [options]

# Short alias
lmci run -p <provider> [options]
Option Description
-p, --provider Cloud provider: aws, azure, gcp, oci
-o, --output Output CSV file
-d, --detailed Detailed breakdown by region
--profile AWS CLI profile name
-s, --subscription Azure subscription ID (repeatable)
--project GCP project ID
--compartment OCI compartment OCID
-v, --verbose Debug logging

Cloud-Native APIs

Provider API Used Performance
AWS Resource Explorer ~2-5 min (all regions in one call)
Azure Resource Graph ~1-2 min
GCP Cloud Asset Inventory ~1-2 min
OCI Search Service ~1 min

Hybrid Resource Units

Calculates LogicMonitor Hybrid Resource Units automatically:

TOTALS
----------------------------------------
  IaaS                        150
  PaaS                        350
  Non-Compute                 500
----------------------------------------
  HYBRID RESOURCE UNITS       200
    (IaaS: 150 + PaaS: ceil(350/7))

Decoupled Architecture

  • Collection: Gathers raw inventory → inventory.json
  • Calculation: Applies license rules → summary.csv
  • Configuration: Resource mappings in config/resource_mappings.json

This allows updating license rules without code changes.

Clear Logging

[13:45:02] Authenticating via: DefaultAzureCredential
[13:45:03] Found 3 subscriptions: Production, Staging, Dev
[13:45:15] Collected 47 inventory records from Azure
[13:45:15] Calculating license requirements...

Output Formats

Summary CSV

Provider,Account,Category,ResourceType,Region,Count
aws,123456789012,IaaS,ec2:instance,us-east-1,42
aws,123456789012,PaaS,lambda:function,us-east-1,28

TOTAL,,IaaS,,,42
TOTAL,,PaaS,,,28
TOTAL,,Non-Compute,,,125
TOTAL,,HYBRID UNITS,,,46

CLI Summary

======================================================================
LICENSE REQUIREMENT SUMMARY
======================================================================

AWS
----------------------------------------
  IaaS                         42
    ec2:instance                   42
  PaaS                         28
    lambda:function                28

======================================================================
TOTALS
----------------------------------------
  IaaS                         42
  PaaS                         28
  Non-Compute                 125
----------------------------------------
  HYBRID RESOURCE UNITS        46
======================================================================

Breaking Changes

  • ⚠️ PowerShell scripts are deprecated (still in repo for reference)
  • ⚠️ AWS requires Resource Explorer to be enabled
  • ⚠️ Credential setup uses cloud-native credential chains

AWS Resource Explorer Limitations

The following services are not indexed by AWS Resource Explorer:

Service Notes
CloudSearch Domain
MediaConnect Flow
MediaConvert Queue
OpsWorks Stack
Q Business Application
QuickSight Dashboard only
Simple Workflow (SWF) Domain
Application Migration Service Source Server
ElasticTranscoder Pipeline

Contact your LogicMonitor representative for manual inventory if you use these services significantly.


Documentation


Testing Status

  • AWS collection validated
  • Azure collection validated
  • GCP collection - testing in progress
  • OCI collection - testing in progress

Feedback

This is a release candidate. Please report issues or feedback before the final v2.0.0 release.