Need help with the Relevance code

Hi,

Can anyone please help me with the relevance on how to get the “SUMMARY of Computer in View Action Info of BES Action” ?

Thanks in Adv.

Regards,
Prabhu

It would be really easy to do this in the Web Reports as there is, more or less, already a stock report that gives the list of actions. From there you create a filter for actions that only have failures attributed to them.

Maybe I’m not understanding your request. Are you looking to get the actual errors output through a relevance clause?

Hi Jmaple,

I need the info of Summery of Action Info. in the web report, which is not populating the exact details which I’m looking for.
Below are the sample which I’m expecting in the web report. If possible please help me with the Relevance Code.

Summary
The action executed successfully.
This action has been applied 1 time and will not be applied again.
Status Completed
Start Time : 11/7/2014 5:39:13 AM
End Time : 11/7/2014 5:39:51 AM
Exit Code : 832

Thanks,
Prabhu

Think this the same question as this post ?

Yeah I think so. Sounds like what you’re looking for you need to basically capture at action runtime with the action property inspectors…

Actually another way to do this might be to look at bfEnterprise directly and get the data that you want, but I don’t think you can get it through REST.

I’m getting this output while using the below code :
Code :
(names of it, ids of it, state of it, status of result of it, detailed status of result of it) of bes actions whose (id of it = 1749)

Results :
BES Web Reports: Enable PDF Reports - Part 1/2, 1749, Expired, Expired, This action expired before it could be executed.

I think, for Exit Code i can use the below code :

(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of it) of bes actions whose (id of it = 1749) OR
(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of result of it) of bes actions whose (id of it = 1749)

Exit Code of will only work on (Win:8.0, Lin:8.0, Sol:8.0, HPUX:8.0, AIX:8.0, Mac:8.0, Ubu:8.1) these machine.

Finally i need the code for
Start Time : 11/7/2014 5:39:13 AM
End Time : 11/7/2014 5:39:51 AM

While writing this property in relevance, I’m getting Error : BES Property not defined.

Please help me on this, Thanks in Adv.

prabhu

If that’s coming out the way you want, what happens when you try this:

(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of it, active start time of it, complete time of it) of bes actions whose (id of it = 1749) OR
(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of result of it, active start time of it, complete time of it) of bes actions whose (id of it = 1749)

I think, for Exit Code i can use the below code :

(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of it) of bes actions whose (id of it = 1749) OR
(names of it, ids of it, state of it, status of result of it, detailed status of result of it, exit code of result of it) of bes actions whose (id of it = 1749)

I don’t think you can do this. I think your exit code is based off of the inspector detailed here:

http://support.bigfix.com/cgi-bin/inspectorsearch/single_inspector.cgi?cpx=p&keyphrase=exit+code+of+%26lt%3Baction%26gt%3B&type=action&win=&lin=&hpux=&mac=&aix=&sol=&wm=&ubu=&client=1

Long story short, exit code of action is only available to the client during the execution of an action.

I think in order to get the exit code, you’d have to do append something to your action. The process is detailed here in an earlier forum post:

Except instead of:

delete __appendfile
appendfile {concatenation "%0d%0a" of (((name of it, value of it) of headers of action) as string)}

You’d probably do something more like:

delete __appendfile
appendfile {concatenation "%0d%0a" of (((name of it, value of it) of exit code of action) as string)}

That will get the exit code on the local client file system, which you can then use an analysis to pick up later.

The other way is to go directly in bfEnterprise and try to fetch the data yourself.

1 Like

It seems that this is a candidate for an RFE to have the exit code added to the available inspectors for session relevance of an action.

Also, if the console is able to show it, then it must be available through something, though that something is probably a direct SQL query if not session relevance.

You are correct, it is obtaining it through SQL. I also do believe this is an RFE already

1 Like

Looks like this RFE was “delivered” by IBM saying that the functionality to report on action exit codes via session relevancy is now available in the REST API. But is a custom report in WebReports that uses session relevancy still not able to include action exit codes?

http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=87203