Custom Action Report

I have a report that will provide me with the name and relevant component count of all systems that are part of a certain baseline and a specific computer group. This works great but how would a change it so it gives me the same results based on Action instead of baseline. Below is the code I use to gather the information from a Baseline:

<script>

<?relevance
(html it) of concatenation of (

(  name of item 1 of it  & "%20" & number of elements of intersection of (relevant fixlet set of item 1 of it; item 0 of it) as string & "%0d%0a" ) of  (set of source fixlets of components of component groups of bes fixlets whose (baseline flag of it AND name of it = "WinBaseLine2008\w0a\201704080900"), members of bes computer group whose (name of it= "w0a"))

) 
?>

</script>

I guess the main question I have is there a way to get a status report of a Baseline Action at halfway point. So, if I have a window of 4 hours, then at the two hour mark I would like to have a report that shows me the computer name and how many patches it has left to be installed.

It would be nice to see the totaled failed, running, and pending restart for each system. For example at the start of patch window I can see computer1 has total of 14 relevant fixlets.

computer1 total relevant 14

At two hour mark

computer1 total relevant 9

pending restart = 3
failed = 1
running = 1

Any help on this would be great.

1 Like

We won’t know the number of component actions that will be relevant ahead of time (they can change as the Client executes the sub-actions), but perhaps something like this can give you much of the sort of data you are looking for?

(it, multiplicity of it) of unique values of ((name of computer of it & " - " & status of it as string) of results (member actions of bes action whose (id of it = <action id>), bes computers))

This will work… The part I was missing is the multiplicity of it. Thank you for helping me out.

Aram,

I was wondering if you could use the name of a bes action instead of the ID. I tried to use name of it = SOMENAME but it will not work. When I looked online, I only see examples of getting status of action using the ID. So can you use the name of the baseline action or does it have to be the ID?

You can use name of it rather than id of it, but as it is above, the name will have to be unique because the expression is expecting a single action. If you wanted to be able to report across a few multiple action groups, you can leverage something like the following:

(it, multiplicity of it) of unique values of ((id of parent group of action of it as string & ": " & name of parent group of action of it & " - " & name of computer of it & " - " & status of it as string) of results (member actions of bes actions whose (name of it = "<baseline action name>"), bes computers))

Aram,

This is perfect and see what you mean by using the name. Since I stopped and re-started the same action name, it grabbed the old and the new. That is something I can work around, so thank you for your help.