-
Notifications
You must be signed in to change notification settings - Fork 127
Description
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.
- line
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.