Skip to content

Not able extract vertica license utilization #580

@mohammadjaanu

Description

@mohammadjaanu

Environment
Agent: newrelic-infra
Flex Version: 1.16.6
OS: Linux (please specify exact distro if possible)
DB: Vertica

Steps to Reproduce
I use Flex to run SELECT GET_COMPLIANCE_STATUS(); on Vertica, which returns output like:
Raw Data Size: 0.44TB +/- 2.15TB
License Size : 1.00TB
Utilization : 44%
Audit Time : ...
My Flex config is:

  • name: VerticaLicenseConsumption
    run: SELECT GET_COMPLIANCE_STATUS();
    split: horizontal
    split_by: "\n"
    set_header:
    • line
      regex_matches:
    • field: line
      pattern: 'Utilization\s*:\s*(\d+)%'
      name: utilization_percent
      When running Flex manually and via the agent, the metric output contains the whole multiline string, but the utilization_percent field is not extracted—event JSON never shows it.

What I Expected
The output should split into lines, and the regex should extract the number (e.g., 44) from the line containing "Utilization : 44%".

The extracted value should appear as utilization_percent in my event data.

What Actually Happened
No value is extracted into utilization_percent.
No errors appear in the logs about regex matching.
Changing the regex (e.g., making it case-insensitive) does not help.
Extraction with simple regex (e.g., .+) as a test also does not work—no custom fields are created.

Manual Extraction Confirmed
Running the same pattern in egrep, Bash, or Python against the output works fine and extracts the value.

Additional Info
Other tabular queries work as expected (fields appear in events).
Issue appears only for queries producing a multiline string output.

Request
Please investigate why split, set_header, and regex_matches do not extract fields from multiline string outputs in Flex, even though docs and previous issues indicate this should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions