Hm. The UploadManager directory on the server might be absolutely huge. I’m not sure you’ll find a good way to query it, and I think I’d have to recommend against this approach. That said, you might try out this form - the ‘find files’ inspector uses OS glob-type names so you can look for ‘Remediation_*’ to match the files, and it’s a slightly better lookup than listing all the files and then filtering with a whose() clause:
find files "Remediation_*" of folders of folders of folders "sha1" of (folders it) of values of settings "_BESRelay_UploadManager_BufferDirectory" of client
Since you’re doing this in an Action, if you were forced to go this route I’d probably run an external shell command to run a dir /s /b \path\Remediation*
, save the output to a file, and parse the output file in relevance.
But what I’d probably recommend instead of all this would be to do all this as a REST API integration, outside of the client relevance. If your remediations are based on Fixlets or Baselines, I’d probably use the REST API to query for Relevant Fixlets or Baselines for each server, and having that same script create the tickets (most ITSM products like ServiceNow would also allow REST or some other API for ticketing).
A session relevance like this would show all the ‘Critical’ fixlets from ‘Patches for Windows’ for some group of computers; you could adjust the computer selection to be a property like ‘Servers’ or repeat for each computer etc.:
(
name of item 0 of it
, name of item 1 of it
) of
(
item 0 of it /* computer */
, item 1 of it /* fixlet */
, (results (item 0 of it, item 1 of it)) whose ( relevant flag of it ) /* fixlet result */
) of
(
elements of item 0 of it /* computers */
, elements of item 1 of it /* fixlets */
) of
(
/* Select computers to check */
set of members of bes computer groups whose (name of it = "ServerBasedGroup-Win")
/* select fixlets to check */
, set of fixlets whose (
exists applicable computers of it
and exists default action of it
and source severity of it = "Critical"
) of all bes sites whose (display name of it = "Patches for Windows")
)
Or, if you’re pre-creating the Baselines, you could report both the baseline and the relevant components from within the Baseline. This lets you get a lot more creative with patch inclusion/exclusion, by only adding the things you want to a Baseline. (You’d probably want to filter the Baselines and Sites here, but for example using all of your custom baselines):
(
name of item 0 of it /* bes computer */
, name of item 1 of it /* relevant baseline for computer */
, names of items 0 of (source fixlets of components of component groups of item 1 of it, item 0 of it) whose (relevant flag of results (item 0 of it, item 1 of it))
) of
(
item 0 of it /* computer */
, item 1 of it /* fixlet */
, (results (item 0 of it, item 1 of it)) whose ( relevant flag of it ) /* fixlet result */
) of
(
elements of item 0 of it /* computers */
, elements of item 1 of it /* fixlets */
) of
(
/* Select computers to check */
set of members of bes computer groups whose (name of it = "ServerBasedGroup-Win")
/* select fixlets to check */
, set of fixlets whose (
baseline flag of it
) of all bes sites whose (custom site flag of it)
)
Either of these should be able to produce the info you need to create your change tickets, without having to run scripts on the clients, use the Archive Manager, or parse through the Archive Manager repository on the server.