The Prognosis PQL Execute statement provides a way to run Prognosis commands, similar to the ones that can be
executed through ircmd.exe. Below are some examples to start/stop a user defined database, and start/stop a threshold from command window. This is particularly useful when managing the databases and thresholds etc. through command or a script.
Start Database
<Prognosis>\Server\Configuration>..\irpqlcli -n "EXECUTE Start_DB 'TestDB', 'START~DBCOLLECT~DB MinimalConfig~DBCONFIG~START TODAY~INTERVAL 10 seconds~VIEW (~RECORD ntprocess~interval 10 seconds~NODE (~NODE #CurrentNode~END_NODE~)~FIELD (~FIELD BUSY~TYPE (MIN)~FIELD CPUTIME~FIELD NAME~FIELD STARTTIM~)~WHERE (BUSY>80)~)~END_DBCONFIG~WRAP YES~WRAPINT 1 days ~SIZE 25~END_DB~END_DBCOLLECT'"
Stop Database
<Prognosis>\Server\Configuration>..\irpqlcli "EXECUTE S top_DB 'TestDB'"
Start Threshold
<Prognosis>\Server\Configuration>..\irpqlcli -n "EXECUTE Start_Threshold 'TestThreshold', 'CONDITION (~THRESHOLD_CONDITION TestCondition~ACTION (~ACTION~LOG_TYPE PROBLEM_SUMMARY~SEVERITY WARNING~END_ACTION~)~VIEW~RECORD PNODES~INTERVAL 10 SECONDS~NODE (~NODE #CurrentNode~END_NODE~)~WHERE (PRODUCTS <> EMPTY)~END_VIEW~AFTER 1 OCCURRENCES~LOGEVERY 10 SECONDS~LOG_TEXT on~OFF_TEXT off~END_THRESHOLD_CONDITION~)'"
Stop Threshold
<Prognosis>\Server\Configuration>..\irpqlcli "EXECUTE Stop_Threshold 'TestThreshold'"