We updated the infrastructure agent on all our windows servers and found that it broke our flex integration on several windows servers.
I have whittled down the config for testing and have found that the config works fine up to New Relic Agent 1.20.3
and then breaks from 1.20.4
. Now I’m not sure if this is a bug or if we have to do things differently, but either way, I’d appreciate some help please.
WORKS
Agent Flex Version
1.20.3 1.4.2, 1.4.3, 1.4.4
DOESN’T WORK
Agent Flex Version
1.20.4 1.4.2, 1.4.3, 1.4.4
1.23.3 1.4.2, 1.4.3, 1.4.4
TESTING INTEGRATION CONFIG
integrations:
- name: nri-flex
interval: 60s
timeout: 300s
config:
name: test
apis:
- name: PathTestInfo
commands:
- run: omreport.exe storage controller -fmt ssv | % {$_ -replace "$", "`n"} | % {$_ -replace "(\d+) [KMGT]+B", "`$1"}
shell: pwsh
split: horizontal
split_by: ";"
header_split_by: ";"
regex_match: false
header_regex_match: false
row_header: 8
row_start: 10
sample_filter:
- ID: \r
perc_to_decimal: true
rename_keys:
"Cache Memory Size": "Cache Memory Size (MBytes)"
Running the nri-flex
on the command line works fine regardless of the version of Infrastructure Agent or version of Flex integration.
PS C:\Program Files\New Relic\newrelic-infra> .\newrelic-integrations\nri-flex.exe -verbose -pretty -config_path "C:\Program Files\New Relic\newrelic-infra\integrations.d\test.yml"
time="2022-03-10T11:30:27Z" level=debug msg="Function.isAvailable: enter"
time="2022-03-10T11:30:27Z" level=debug msg="Function.isAvailable: exit status: false"
time="2022-03-10T11:30:27Z" level=info msg=com.newrelic.nri-flex GOARCH=amd64 GOOS=windows version=1.4.3
time="2022-03-10T11:30:27Z" level=debug msg="config: git sync configuration not set"
time="2022-03-10T11:30:27Z" level=warning msg="config: testing agent config, agent features will not be available"
time="2022-03-10T11:30:27Z" level=debug msg="config: running async" name=test
time="2022-03-10T11:30:27Z" level=debug msg="config: processing apis" apis=1 name=test
time="2022-03-10T11:30:27Z" level=debug msg="fetch: collect data" name=test
time="2022-03-10T11:30:27Z" level=debug msg="commands: executing" count=1 name=test
time="2022-03-10T11:30:29Z" level=debug msg="command: running omreport.exe storage controller -fmt ssv | % {$_ -replace \"$\", \"`n\"} | % {$_ -replace \"(\\d+) [KMGT]+B\", \"`$1\"}"
time="2022-03-10T11:30:29Z" level=debug msg="processor-data: running data handler" name=test
time="2022-03-10T11:30:29Z" level=debug msg="config: finished variable processing apis" apis=1 name=test
time="2022-03-10T11:30:29Z" level=info msg="flex: completed processing configs" configs=1
{
"name": "com.newrelic.nri-flex",
"protocol_version": "3",
"integration_version": "1.4.3",
"data": [
{
"metrics": [
{
"Abort Check Consistency on Error": "Disabled",
"Alarm State": "Not Applicable",
"Allow Revertible Hot Spare and Replace Member": "Enabled",
"Auto Replace Member on Predictive Failure": "Disabled",
"Automatic Disk Power Saving (Idle C)": "Not Applicable",
"BGI Rate": 30,
"Cache Memory Size (MBytes)": 512,
<redacted for brevity>
"Storport Driver Version": "10.0.14393.4825",
"T10 Protection Information Capable": "No",
"event_type": "PathTestInfoSample",
"integration_name": "com.newrelic.nri-flex",
"integration_version": "1.4.3"
},
{
"event_type": "flexStatusSample",
"flex.Hostname": "surrey",
"flex.IntegrationVersion": "1.4.3",
"flex.counter.ConfigsProcessed": 1,
"flex.counter.EventCount": 1,
"flex.counter.EventDropCount": 0,
"flex.counter.PathTestInfoSample": 1,
"flex.time.elaspedMs": 1821,
"flex.time.endMs": 1646911829734,
"flex.time.startMs": 1646911827913
}
],
"inventory": {},
"events": []
}
]
}
The error/result I get when querying in the Query Builder is:
e[91mInvalidOperation: e[91mCannot run a document in the middle of a pipeline: C:\Program Files\Dell\SysMgt\oma\bin\omreport.exe.e[0m
If anyone can help by either getting this fixed or telling me how I can get this working, then that would be greatly appreciated. Thanks.