I have a script that generates baselinesetter commands to activate the baseline for selected qos metrics, example
"C:\Nimsoft\jre\jre8u352b08\bin\java.exe" -cp .;lib/* com.nimsoft.threshold.cmd.BaselineSetter -user administrator -pwd xx -probe /xxxxxxxxx_domain/xxxxxxxxx_hub/xxxxxxxxx/baseline_engine -o add -id M4D749F059DB2EE749F136319F94C2F71
But an error is returned:
Error: Could not find or load main class com.nimsoft.threshold.cmd.BaselineSetter
When using a script that generates baseline_engine baselinesetter commands to activate the baseline for selected qos metrics, e.g.,
"C:\Nimsoft\jre\jre8u352b08\bin\java.exe" -cp .;lib/* com.nimsoft.threshold.cmd.BaselineSetter -user administrator -pwd xx -probe /<domain>/<hub>/<robot>/baseline_engine -o add -id M4D749F059DB2EE749F136319F94C2F71
...the command needs to be run with administrative rights (Run As Administrator) and executed from the baseline_engine probe directory.
Probe Utility command to add baselines (example):
pu -u administrator -p xxx /<domain>/<hub>/<robot>/baseline_engine _add_baselines [{"met_id":"M03F5BF30912E93E2750CC5F7E286D152"}]
Probe Utility command to add thresholds (example):
pu -u administrator -p xxx /<domain>/<hub>/<robot>/baseline_engine _add_thresholds [{"id":"M74C640C0B17596F3014798EB3BE2AAE0","threshold_id":"0","operator":["greaterthan","greaterthan","greaterthan","greaterthan","greaterthan"],"levels":["50.0,60.0,70.0,80.0,90.0"],"thresholdType":"dynamic","calcType":"percent","subsysId":"0.0"}]
Working json format for _add_thresholds callback of baseline_engine:
[{"id":"M2E91169409EAEA5122C964EFA85B3B0C","threshold_id":0,"thresholdType":"dynamic","calcType":"percent","subsysId":"1.1.1.1","operator":["greaterthan","greaterthan","greaterthan","greaterthan","greaterthan"],"levels":[50.0,100.0,150.0,200.0,300.0],"customAlarmMessage":"${qos_name} is at ${value}","enabled":true}]
Here is the format to add the thresholds from the command line:
java -cp ".;lib/*" com.nimsoft.threshold.cmd.ThresholdSetter -user administrator -pwd <password> -probe /<domain>/<hub>/<robot>/baseline_engine -id M2E91169409EAEA5122C964EFA85B3B0C -threshType dynamic -type percent -o G -level2 100.0 -level3 150.0 -level4 200.0 -level5 300.0 -subsysId 1.1.1.1 -customAlarmMessage “${qos_name} is at ${value}”
Working example of _add_thresholds PU callback from the command line with successful creation of a customAlarmMessage
C:\\Program Files (x86)\\Nimsoft\\bin>pu -u administrator -p <password> /<domain>/<hub>/<robot>/baseline_engine _add_thresholds [{"id":"M2E91169409EAEA5122C964EFA85B3B0C","threshold_id":1,"thresholdType":"dynamic","calcType":"percent","subsysId":"1.1.1.1","operator":["greaterthan","greaterthan","greaterthan","greaterthan","greaterthan"],"levels":[50.0,100.0,150.0,200.0,300.0],"customAlarmMessage":"""${qos_name} is at ${value}""","enabled":true}]
Create Baselines and Thresholds for Probes Without the Web-based GUI
Baselines
https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/monitoring/infrastructure-core-components/baseline-engine/baseline-engine-configuration.html