I feel like it should be possible to get the number of times an action has been tried and failed as well as how many times it has succeeded. It should also then be possible to get the number of times it has been attempted in total. (successes + failures)
Ideally, I’d like to be able to get this info from both the context of the action running in actionscript, as well as through session relevance.
This appears to be relevant info through session relevance:
(apply count of it, retry count of it) of results of bes actions whose(123 = id of it)
This should be the client relevance using relevance substitution during action execution:
{active count of active action}
{first active count of active action}
These values do seem to correspond to one another, but they don’t seem to actually give the details on number of attempts correctly, particularly when there are multiple successes and failures of the same action over time.
Then there is also this option:
(it as string) of rows of statements "SELECT TotalActiveCount,ActiveCount FROM ACTION_STATE_HISTORY WHERE ActionID=123" of sqlite databases of files "ActionHistory.db" of folders "C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Global"
This gives multiple results in some cases, seemingly when the action has run multiple times.
Here is another option to get the total number of attempts:
This option requires renaming the current log file to something like 99999999.log because it is open for writing in the client already. This renaming might not be needed if evaluated through the console, but I’m not certain.
number of lines containing "ActionLogMessage: (action:123) ending action" of files whose(12 = length of name of it AND exists lines of it) of folders "Logs" of folders "C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Global"
This is the only option that seems accurate and sensible, as far as the total number of successes+failures.
None of these options seem to give what I am looking for, but they seem like the closest I’m going to get.