curl POST 'http://localhost:9200/spark-jobs-conf/configs/' -d '{ "kpiDefinition": { "kpiID": "140", "expectedTrend": "DOWNWARDS", "name": "Average Duration of Successful Deployments", "action": "AVERAGE", "schedule": "DAILY", "vector": "DEPLOYMENT", "toolName": "RUNDECK", "isGroupBy": false, "groupByFieldName": "", "groupByField": "", "averageField": "SPKduration", "startTimeField": "SPKstartTime", "endTimeField": "SPKendTime", "resultOutPutType": "time", "isComparisionKpi": true, "esquery": "{ \"query\": { \"bool\": { \"must\": [ { \"match\": { \"SPKvector\": \"DEPLOYMENT\" } }, { \"match\": { \"SPKtoolName\": \"RUNDECK\" } }, { \"match\": { \"SPKstatus\": \"Success\" } }, { \"bool\": { \"must\": [ { \"range\": { \"SPKstartTime\": { \"gte\": \"__dataFromTime__\", \"lte\": \"__dataToTime__\", \"format\": \"epoch_millis\" } } } ] } } ] } } }", "timeFormat": "YYYY-MM-DD HH:MM", "esresource": "neo4j-index-node/SPKDATA", "es-index-read-missing-as-empty": true }, "name": "Average Duration of Succesful Deployments", "nextRun": "1511395260000", "lastRunTime": 1511395260000, "isActive": true, "schedule": "DAILY" }' Info |
---|
"__dataFromTime__", and "__dataToTime__" will be calculated at run time by InSights Inference service based on the schedule of the InSights Inference - KPI Job. |
|