Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top71
top71


Tip

Learn to Add/Edit InSights Insights Inference - KPI on this page. 


Panel

On this page:


Table of Contents

InSights

Insights Inference - KPI Job JSON Structure 


Panel


KPI AttributeDescription

kpiID

It is like a primary key of a InSights Insights - Inference KPI. It should be unique, and have numerical value. It shall also be specified same when adding custom KPI message for UI.
expectedTrend

It is expected trend of the InSights Insights Inference - KPI.

Eg. UPWARDS / DOWNWARDS

nameIt denotes the name of the InSights Insights Inference - KPI.
action

It is the Mathematical Function that is imposed on a InSights Insights Inference - KPI. It shall also be specified same when adding custom KPI message for UI.

Eg. AVERAGE / COUNT / MINMAX

schedule

It is the job schedule of a InSights Insights Inference - KPI.

Eg. DAILY / WEEKLY / MONTHLY / YEARLY

vector

It denotes the DevOps vector of a tool, which is specified in the InSights Insights Inference - KPI.

Eg. BUILD, CODEQUALITY, DEFECTS, DEPLOYMENT etc,.

toolName

It is the name of the DevOps tool.

Eg. JIRA, Jenkins, Sonar, Rundeck etc,.

isGroupBy

It is used for Aggregation if more than one instance is specified. Its value is Boolean.

Eg. true / false 

groupByFieldNameIt is required when "isGroupBy" is set to true. It is used to specify the description for "groupByField", on which the Aggregation would be imposed.
groupByFieldIt is required when "isGroupBy" is set to true. It is used for Aggregation if more than one instance is specified. It's generally the name of the field on which Aggregation will be imposed.
averageFieldIt is required only when the KPI "action" is AVERAGE. Input the name of the field on which AVERAGE Mathematical Calculations must be imposed.
startTimeFieldIt indicates the Start time property/field name of a DevOps tool. Its input is a String value. It is mandatory if your InSights Insights Inference - KPI's "action" is "AVERAGE".
endTimeFieldIt indicates the End time property/field name of a DevOps tool. Its input is a String value. It is mandatory if your InSights Insights Inference - KPI's "action" is "AVERAGE".
resultOutPutType

It indicates the result type of the InSights Insights Inference - KPI. For instance, AVERAGE type KPI could have result as Average Time or Average of Numbers. Use time when the type of output is Time Duration, and number when the type of output is just a Normal Number.

Eg. time / number

isComparisionKpi

It is a Boolean value. It generally indicates whether or not the KPI result should have a comparison with previous KPI result.

Eg. true / false

esqueryIt is an Elasticsearch query to fetch the data and collect the results. 
timeFormat

It is the standard time format of a region.

Eg. YYYY-MM-DD HH:MM

esresource

It is the node/index at which the tools data is present in Elasticsearch.

Eg. neo4j-index-node/tool-data

es-index-read-missing-as-empty

It is a Boolean value used to denote undefined nodes/indexes in Elasticsearch as empty.

Eg. true / false

nextRunIt is the next scheduled date on which InSights Insights - KPI Job Execution will be executed. It is represented as Epoch Time in milliseconds.
lastRunTimeIt is the previous scheduled date on which  InSights Insights - KPI Job Execution was run. It is represented as Epoch Time in milliseconds.
isActive

It denotes whether or not the InSights Insights Inference - KPI is in use or not. It is generally used to Enable / Disable the KPI. It accepts a Boolean value.

Eg. true / false


Sample CURL command to create an

InSights

Insights KPI


Info

It is required to execute CURL command from a console such as Command Prompt/Git Bash.

The following is a sample CURL command to Add a KPI in Elasticsearch - 

Please note below is just a sample and you will need to replace the field names like SPKduration, SPKvector, SPKtoolName etc with relevant field names from your Elasticsearch DB. Do not use below sample as is. 

Panel

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
}'

Info

"__dataFromTime__", and "__dataToTime__" will be calculated at run time by InSights Insights Inference service based on the schedule of the InSights Insights Inference - KPI Job.



Info

To view/download sample of current/default supported KPI Jobs, click here.


Sample

InSights

Insights Inference - KPI Job in Elasticsearch