Run a batch file in 'Custom script' under 'Monitors'

Hi all,

We would like the ability to run batch files under ‘custom scripts’ under ‘Monitors’.
There is already a script under procedures called “Run a batch file” which works well, but how do we integrate it with the ‘Custom Script’ under ‘Monitors’ so that it can read the output of the batch script? In other words, under Custom Scripts in Monitors, you can write any custom script with an output of alert (0) to disable an alert or alert (1) to trigger an alert. How can we execute a batch script within this monitor and allow python to read the ouput of the batch script?

Thanks in advance!

You should check the Run Powershell Script procedure. You can just load the exit code of ecmd into into variable or should modify ecmd like

alert(ecmd('cmd "%s"'%file_path))