Agent 2.0 - Sample config.json file

Check the various properties present in config.json file on this page

Content on this page


Sample config.json file


The below sample is config.json file for GitHub.


 Click here to expand sample config.json

{

"mqConfig": {

"user": "iSight",
"password": "iSight",
"host": "127.0.0.1",
"exchange": "iSight",
"agentControlXchg": "iAgent"
},

"subscribe": {

"config": "SCM.GIT.config"
},

"publish": {

"data": "SCM.GIT.DATA",
"health": "SCM.GIT.HEALTH"
},

"communication": {

"type": "REST"
},

"dynamicTemplate": {

"responseTemplate": {

"sha": "commitId",

"commit": {

"author": {

"name": "authorName",
"date": "commitTime"

}

}

}

},

"enableBranches": false,
"toolCategory": "SCM",
"toolsTimeZone": "GMT",
"insightsTimeZone": "Asia/Kolkata",
"useResponseTemplate": true,
"auth": "base64",
"runSchedule": 30,
"timeStampField": "commitTime",
"timeStampFormat": "%Y-%m-%dT%H:%M:%SZ",
"startFrom": "2016-10-10 15:46:33",
"accessToken": "accesstoken",
"getRepos": "https://api.github.com/users/<USER_NAME>/repos",
"commitsBaseEndPoint": "https://api.github.com/repos/<REPO_NAME>/",
"isDebugAllowed": false,
"loggingSetting": {

"logLevel": "WARN"
}

}

Description of the properties in config.json file


  • The below is an example provided for the GIT agent. Please check other agent specific config.json in github or docroot.
PropertyDescription

"mqConfig": {

"user": "iSight",
"password": "iSight",
"host": "127.0.0.1",
"exchange": "iSight",
"agentControlXchg": "iAgent"
},

  • mqConfig - It contains the configuration used to setup and access RabbitMQ.
    • user - It is the username for RabbitMQ authentication.
    • password - It is the corresponding password for RabbitMQ authentication.
    • host - It is the host location name where RabbitMQ is hosted.
    • exchange It is the channel where agent related data exchanges will take place.
    • agentControlXchg It is the channel where control of agent related data information will take place.

"subscribe": {

"config": "SCM.GIT.config"
}

  • subscribe - It contains information related to the agent subscription queue.
    • config  - It is the name of the agent subscription queue.
    • The first part if tool category, second part is tool name

"publish": {

"data": "SCM.GIT.DATA",
"health": "SCM.GIT.HEALTH"
}

  • publish - It contains publishing information related to the agent.
    • data - It is queue from which tool data is published into Neo4j. For example for GIT tool, it has to be SCM.GIT.DATA, for Rally tool, it will be ALM.RALLY.DATA.
    • The first part if tool category, second part is tool name, third is DATA or HEALTH depending on what information you are collecting.
    • health - It is queue from which tool execution information is published into Neo4j.

"communication": {

"type": "REST"
}

  • communication - It contains information related to the type of communication between the agent and the tool.
    • type - It defines the type of the communication. Eg: REST i.e. using RESTful APIs.

"dynamicTemplate": {

"responseTemplate": {

"sha": "commitId",

"commit": {

"author": {

"name": "authorName",
"date": "commitTime"

}

}

}

}

  • dynamicTemplate - This property contains information related to the response that is expected from the tool over REST APIs. This can be configured/customized at run time on the Agent's User Interface page.
    • responseTemplate - This is the response that is expected from the tool over REST API. This section shall always be included inside "dyanmicTemplate".
enableBranches

This is property that sets branching information for the tool.

toolCategory

It is name of the SDLC functional block.

toolsTimeZoneIt is the time zone/regional time at which the tool is running
insightsTimeZoneIt is the time zone/regional time at which the Insights Application is running
useResponseTemplateIt sets whether to use Response Template or not.
authIt is the authentication type to encrypt/de-crypt authentication tokens.
runScheduleIt is the agent run schedule in minutes.
timeStampFieldIt is the time stamp field present in the tool.
timeStampFormatIt is time stamp format for the "timeStampField".
startFromIt is the time from which agent should start collecting data from the tool.
accessTokenIt is the authentication token to access the REST APIs and data from the tool.
getReposIt is the REST API to collect repository information in GitHub.
commitsBaseEndPoint

It is the end point to collect commits information.

isDebugAllowedIt is a flag to set debugging to true or false. 
loggingSettingIt contains agent logs related configuration.

©2021 Cognizant, all rights reserved. US Patent 10,410,152