1 of 1 people found this helpful
what product is this for specifically ?
It looks like this is a TrueSight Ops Manager query. The documentation is here: Creating remote actions - BMC TrueSight Infrastructure Management 10.0 - BMC Documentation
You can add slots into the command, they give an example with ping, but you should be able to do it with PS queries. Remote Commands use the xCmd product, which is discussed in more detail on the AO site: xCmd utility - Documentation for BMC Atrium Orchestrator Content 20.16.01 - BMC Documentation
You need to create mrl similar to:
refine refine_send_to_alert_system: EVENT($EV)
where [ ( $EV.status == OPEN AND $EV.severity not_equals INFO ) ]
opadd($EV, "", "", "Executed Remote Action to send alert automaticly");
Then you need to call the sh or cmd file with this in the cmd:
powershell -NoProfile -ExecutionPolicy Bypass -Command "c:/path/to/powershell/script.ps1"
In the powershell script just reference the slots you need via the param and $env feature.
[string]$msg = $env:msg,
[string]$eventid = $env:event_handle,
[string]$status = $env:status,
[string]$url = $env:mc_ueid,
[string]$host2 = $env:mc_host,
[string]$time = $env:date_reception,
[string]$severity = $env:severity
write-host "$time : $severity : $msg"