A user asked if it is possible to pass the PID of a process that has become high to a scripted action. It can be done by assigning the script to the process and adding the PID as an argument. The argument will contain the process’ values at the time the script is run or the trigger is fired. More information is available at https://support.controlup.com/v1/docs/script-based-actions-sba#adding-arguments-to-your-script.
Read the entire ‘Passing PID of High Process to Scripted Action in ControlUp’ thread below:
Hello, I’m working automated script action. my plan is to have the trigger be for a specific process that becomes high. My question: Is there a way to pass the PID of the process that reached high to the scripted action(powershell)?
Sure thing. If the script is assigned to process you can add the PID as argument.
https://support.controlup.com/v1/docs/script-based-actions-sba#adding-arguments-to-your-script
This examples shows how the Session Id is added as argument…
and that pid is pass from the trigger? I know I can right click on a process and run the script off a process that I select but I’m not seeing where it says the item that triggers the actions pid is captured.
With any script you can add arguments that adds context to the script. So these arguments contain the actual values of the process, sessions, machine, hosts, etc, at the time when you run the script or when the trigger is firing the script.
Continue reading and comment on the thread ‘Passing PID of High Process to Scripted Action in ControlUp’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers