We have some scanning software that occasionally writes an “Agent ID” value to a log file. This Agent ID is unique to each device, and helpful to correlate data between our platforms, so we’d like to retrieve it in BigFix.
An example line from the log file is below:
2024-04-20 21:04:31,974 [INFO] [agent.agent_beacon]: Agent Info -- ID: 0bd66ff79c27******************** Version: 4.0.7.26 (1712348425)
This line appears somewhat frequently in the log file, and I’d like to get the data between ID:
and Version:
. The log file is frequently written to, and across our deployment, ranges from ~1MB to 10MB.
I’ve been using the follow relevance to grab the ID:
Q: unique values of (preceding texts of firsts "Version: " of (following texts of firsts "ID: " of (locked lines containing "Agent Info" of files ("C:\Program Files\Rapid7\Insight Agent\components\insight_agent\common\agent.log" ; "/opt/rapid7/ir_agent/components/insight_agent/common/agent.log"))))
A: 0bd66ff79c27********************
T: 199.383 ms
I: plural string with multiplicity
The problem I’m having is that a huge number of endpoints return <error>
, with the reason being The expression could not be evaluated: File error "14EndOfFileError"
on Macs, and Inspector interrupted.
on Windows
I have not found any correlation between the size of the log file and the error occurring.
Stripping the relevance down to just the locked lines gives me very similar evaluation times:
Q: (locked lines containing "Agent Info" of files ("C:\Program Files\Rapid7\Insight Agent\components\insight_agent\common\agent.log" ; "/opt/rapid7/ir_agent/components/insight_agent/common/agent.log"))
A: 2024-04-20 21:04:31,974 [INFO] [agent.agent_beacon]: Agent Info -- ID: 0bd66ff79c27******************* Version: 4.0.7.26 (1712348425)
A: 2024-04-20 21:05:04,036 [INFO] [agent.agent_beacon]: Agent Info -- ID: 0bd66ff79c27******************** Version: 4.0.7.26 (1712348425)
[...]
A: 2024-04-21 03:16:08,211 [INFO] [agent.agent_beacon]: Agent Info -- ID: 0bd66ff79c27******************** Version: 4.0.7.26 (1712348425)
T: 199.469 ms
I: plural file line
so I don’t think there’s any way to improve on the runtime.
Is it perhaps just doomed without deploying a separate fixlet to grab and store the data?