How do you configure baseline and time to threshold settings in bulk from the command line?
search cancel

How do you configure baseline and time to threshold settings in bulk from the command line?

book

Article ID: 72388

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

You may want to generate the Situations to Watch Report but it returns:

No results found. This report has no data. Please verify that you are collecting time to threshold data for the selected group.

You would need to configure metrics that you are collecting under that group for time to threshold. This is generally done via Admin Console, on a per probe basis. Below you will find an example of how to do this in bulk: 

Environment

Release:
Component: UIMBAE

Resolution

Here is a sample query that you can run to get metric ids for a metric QOS_DISK_USAGE: 

SELECT 
qd.source, 
qd.qos, 
qd.target, 
qd.r_table, 
qd.table_id, 
qd.ci_metric_id, 
qd.probe, qd.origin, 
ci.ci_name, 
cid.ci_type, 
cid.ci_description 
FROM cm_configuration_item_definition cid, 
cm_configuration_item_metric cim, s_qos_data qd, 
cm_configuration_item ci, cm_device d, cm_computer_system cs 
WHERE cs.cs_id = d.cs_id AND d.dev_id = ci.dev_id 
AND cim.ci_metric_id = qd.ci_metric_id AND ci.ci_type = cid.ci_type 
AND ci.ci_id = cim.ci_id and qd.qos = 'QOS_DISK_USAGE' 
ORDER BY cid.ci_description,qd.probe,qd.qos,qd.target,qd.source 

From here you can run the callback to add them to the baseline engine: 

...Nimsoft\jre\jre8u102\bin\java -cp .;lib/* com.nimsoft.threshold.cmd.BaselineSetter -user administrator -pwd <password> -probe /<domain>/<hub>/<robot>/baseline_engine -o add -id <metric_id>

Also you can format a file with the following (line per metric id): 

{"interval":3600,"outlierMin":-Infinity,"outlierMax":Infinity,"nativeInterval":false,"met_id":"<metric_id>"} 

save the file to the baseline probe directory then run this command instead 

...Nimsoft\jre\jre8u102\bin\java -cp .;lib/* com.nimsoft.threshold.cmd.BaselineSetter -user administrator -pwd <password> -probe /<domain>/<hub>/<robot>/baseline_engine -o add -f new.txt 

These will update the ...Nimsoft\probes\slm\baseline_engine\cache_dir\metricset.txt.zip 

Next you will also need to add a TTT setting for the same metrics to the prediction_engine (this is run from the prediction_engine directory) 

...Nimsoft\jre\jre8u102\bin\java -cp .;lib/* com.nimsoft.analytics.cmd.TTTCommand -user administrator -pwd <password> -probe /<domain>/<hub>/<robot>/prediction_engine -id <metric_id> -qos QOS_DISK_USAGE -units HOURS -value 100 -level 5 

Allow a minimum of 2 hours (post top of the hour) before running the Situations to Watch report.