Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Learn to Add/Edit KPIs on this page. 

On this page:



InSights Inference - KPI JSON Structure 


KPI AttributeDescription

kpiID

It is like a primary key of a KPI. It should be unique, and have numerical value.
expectedTrend

It is expected trend of the KPI.

Eg. UPWARDS / DOWNWARDS

nameIt denotes the name of the KPI.
action

It is the Mathematical Function that is imposed on a KPI.

Eg. AVERAGE / COUNT / MINMAX

schedule

It is the job schedule of a KPI.

Eg. DAILY / WEEKLY / MONTHLY / YEARLY

vector

It denoted the DevOps vector of a tool, which is specified in the 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 

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 name. Its input is a String value.
endTimeFieldIt indicates the End time property name. Its input is a String value.
resultOutPutType

It indicates the result type of the 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 date on which InSights - KPI Job Execution will be scheduled. It is generally represented as Epoch Time in milliseconds.
lastRunTimeIt is the previous date on which  InSights - KPI Job Execution was scheduled. It is generally represented as Epoch Time in milliseconds.
isActive

It denotes whether or not the InSights 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 KPI


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 - 

curl POST 'http://localhost:9200/spark-jobs-conf/configs/' -d '{
"kpiDefinition": {
"kpiID": "140",
"expectedTrend": "UPWARDS",
"name": "Average Duration of Succesful 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"
}'


  • No labels