Skip to content

Use -f flag for targeted feature scraping to improve performance #204

@Mr-Bubz

Description

@Mr-Bubz

Problem

The exporter currently uses lmutil lmstat -a, which queries ALL features. On large license servers (e.g. Siemens with hundreds of features), this command is extremely slow and resource-intensive, often causing timeouts in Prometheus. A single scrape takes ~3 minutes to complete in my use case, even though features_to_include only lists 6 licenses.

Testing

Ran lmutil lmstat via command line.

  • lmutil lmstat -a: 2 minutes
  • lmutil lmstat -f feature_X: 10 seconds

Proposal

Modify the collector to utilize the features_to_include list from config.yml. If this list is present, the exporter should iterate through these features and execute lmutil lmstat -f instead of a global scrape. This shifts the filtering from post-processing (Regex) to the lmutil command itself.

I am willing to contribute a PR for this if the approach is approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions