Test Action Header Info - Universal
Log In or Register to download the BES file, and more.

0 Votes

Description

WARNING: This should only be run for on a system for testing what data is available. This should not be deployed to user systems. This could be useful as an offer only available to Admins for debugging.

This will dump a bunch of data to a file. This is useful for seeing what data is available internally for introspection and use. On Windows, this action can open the resulting file in Notepad by specifying a logged on current user. (currently hard coded to "jgstew")

 


Property Details

ID26698
StatusAlpha - Code that was just developed
TitleTest Action Header Info - Universal
DomainBESC
SourceInternal
Source IDjgstew
Source Release Date8/27/2015 12:00:00 AM
Is TaskTrue
Added by on 5/20/2020 11:42:37 AM
Last Modified by on 5/20/2020 11:42:37 AM
Counters 43 Views / 13 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 85 fixlets and 87 analyses   * Results in a true/false
Show indented relevance
true

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
//  https://support.bigfix.com/inspectors/Fixlet%20Objects_Any.html
// https://support.bigfix.com/inspectors/Action%20Objects_Any.html
// https://forum.bigfix.com/t/action-parameters-in-actionscript/3345/2
// https://forum.bigfix.com/t/newer-actionscript-commands/11677
// http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_override.html


// ----------------------------------------------------------------------
// How do I get these values?
// Fixlet:
// x-bes-textfields-hash: sha256,?????
// Content-Type: text/html; charset=us-ascii
// Action:
// mime-version: ??
// Content-Type: application/x-Fixlet-Windows-Shell
// fixlet-context: ????
// action-parameter: "action issue date"="???"

parameter "start" = "{now}"
parameter "test" = "testing"

//pause while{ now - (it as time) of (parameter "start") < 2 * second }

delete __createfile

createfile until END_OF_FILE
// NOTE: most of this info is not accurate when executed through a baseline

Time from last UDP to execute: { (it / minute) of (now - last command time of client) | ERROR "Unknown" } minutes

ID: {id of active action}
origin fixlet id: {origin fixlet id of active action}

is this a multi-action group leader? : { group leader of active action }

is this an offer? : { offer of active action }
offer accepted? : { offer accepted of active action }

IDs of Actions:
{ concatenations "%0d%0a" of (it as string) of ids of actions }

Action Headers:
{ concatenation "%0d%0a" of (name of it & " = " & value of it) of headers of action | "ERROR" }

Fixlet Headers:
{ concatenation "%0d%0a" of (name of it & " = " & value of it) of headers of fixlets whose(id of it = origin fixlet id of active action) of current sites | "ERROR" }


Current Site info:
--------------------
Name: { concatenation ";" of names of current sites | "ERROR" }
tag: { concatenation ";" of site tags of current sites | "ERROR" }
type: { concatenation ";" of types of current sites | "ERROR" }
url: { concatenation ";" of urls of current sites | "ERROR" }
gather schedule authority: { unique value of gather schedule authoritys of current sites | "ERROR" }
gather schedule time interval: { concatenation ";" of (it as string) of gather schedule time interval of current sites | "ERROR" }
# of relevant fixlets: { (it as string) of number of relevant fixlets of current sites | "ERROR" }
# of relevant offer actions: { (it as string) of number of relevant offer actions of current sites | "ERROR" }

All Sites info:
--------------------
# of all relevant offer actions: { (it as string) of sum of number of relevant offer actions of sites | "ERROR" }
# of relevant fixlets: { (it as string) of sum of number of relevant fixlets of sites | "ERROR" }


Timing Info:
--------------------

now: {now}

pending time: {pending time of active action}

Action Taken Time: {parameter "action issue date" of action}
(now - Action_Taken_Time): { now - ( (it as time) of parameter "action issue date" of action ) }

Active_Start_Time: {active start time of active action}

(Active_Start_Time - Action_Taken_Time): { (active start time of active action) - ( (it as time) of parameter "action issue date" of action ) }

Total Execution Time, with 2 second pause:
(now - Active_Start_Time): { now - (active start time of active action) }


Action Parameters:
--------------------
Names:
{ concatenation "%0d%0a" of unique values of preceding texts of firsts "%22" of following texts of firsts "%22" of lines containing "parameter" whose(it contains "%22" AND exists (it as lowercase) whose(it starts with "parameter" OR it starts with "action-parameter" OR it starts with "action parameter query") ) of files whose(name of it = "Action " & (id of active action as string) & ".fxf") of folders whose(name of it as lowercase contains "site" AND name of it does not start with "CustomSite_") of data folders of clients }

Values:
{ concatenation "%0d%0a" of parameters (unique values of preceding texts of firsts "%22" of following texts of firsts "%22" of lines containing "parameter" whose(it contains "%22" AND exists (it as lowercase) whose(it starts with "parameter" OR it starts with "action-parameter" OR it starts with "action parameter query") ) of files whose(name of it = "Action " & (id of active action as string) & ".fxf") of folders whose(name of it as lowercase contains "site" AND name of it does not start with "CustomSite_") of data folders of clients) of actions }


Action FXF:
--------------------
{ "RemovedThisToSeeFullFXF |" | concatenation "%0d%0a" of lines of files whose(name of it = "Action " & (id of active action as string) & ".fxf") of folders whose(name of it as lowercase contains "site" AND name of it does not start with "CustomSite_") of data folders of clients | ERROR "Unknown" }

Origin Fixlet FXF:
--------------------
{ concatenation "%0d%0a" of lines of files whose(name of it = "Fixlet " & (origin fixlet id of active action as string) & ".fxf") of items 1 of ( (following texts of lasts "/" of values of headers "site-context" of actions) , folders of data folders of clients ) whose(name of item 1 of it = item 0 of it) | ERROR "Unknown" }

END_OF_FILE

if { windows of operating system }

delete C:\Users\Public\Documents\action_header_info.txt
copy __createfile C:\Users\Public\Documents\action_header_info.txt

if { exists names whose(it = "jgstew") of (current users; logged on users) }
override run
runas=currentuser
run notepad C:\Users\Public\Documents\action_header_info.txt
endif

else

delete /tmp/action_header_info.txt
copy __createfile /tmp/action_header_info.txt

endif
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!