WebHook Agent Configuration
Introduction
Insights has introduced new version of webhook framework using existing data collection agent framework. It reuses some of the based components of agent framework. Through new webhook framework using Python, Insights is providing flexibility to parse complex payloads as well provides options to update the existing data (Nodes in Neo4j) which was not possible in old webhook framework. This framework works like agent and will need a separate webhook parsers for each DevOps tools. However, this will add tremendous flexibility to capture any kind of data and will have consistent framework for data collection. Developing a new webhook agent will be as simple as creating new agent and should not take more than a two week sprint to develop from scratch.
If for a tool webhook agent is not available and requirement is to collect plain data without updates, then old webhook framework can also be used.
Few key benefits of new framework -
Process complex messages like json array
Use same Platform Engine for Agent and WebHook
Create Self relationship using relationship metadata
Possible to capture data using mixture of pull and push mechanism
Reduce Maintenance effort like auditing
Easy to configure from UI screen
Easy for Enhancement, Implementation engineer will modify based on client requirement
Possible to use multiple field for insightsTimeX calculation like commitTime, UpdatedAt
Prerequisite
Insights >= v8.0
Set up WebHook Subscriber PlatformInsightsWebHook as mention in Installing Webhook Subscriber and Webhook Engine
Daemon Agent should be configured
Make sure that your necessary port are open test following URL from any other system which is outside of network http://<HostIP>/webhook/PlatformInsightsWebHook/insightsDevOpsWebHook?webHookName=git_webhook
Make sure that "webhookHost": updated in uiConfig.json ex: http://<HostIP>/webhook/
Currently WebHook agent supported for both Python2 and Python3
Currently Supported tool
GitHub
GitLabIssue
UI Configuration
Click "Agent Management" under the Admin section.
To configure WebHook, click Add button on the top right corner.
WebHook configuration from Agent Management screen is supported from version v8.0.
Select the OS type, type as WebHook, version and tool for which WebHook needs to be configured.
Add WebHook details and click on add button below to register. Change Dynamic template as per client needs
Once WebHook is registered successfully, then URL for the selected WebHook can be copied by using Copy to Clipboard Icon.
Once the link is copied then it needs to be added in the actual tool’s WebHook.
please refer Agent Management section under 'Configuration' helps to Add / Change Status / Edit / Delete Agents. for more Agent operation.
WebHook Subscriber
Tool WebHook will push data to WebHook Subscriber when an event occurs and WebHook subscriber will publish the received data to the WebHook queue mentioned in WebhookPayloadDataQueue.
WebHook Agent
Registered WebHook agent will consume data from WebhookPayloadDataQueue, processes message according to the dynamic template mentioned in config.json and publish to the data in publish.data queue.
Engine
Platform Engine will consume this message from data queue and store it in neo4j.
Note: Same Platform Engine will be used for both Agent and WebHook Agent.
©2021 Cognizant, all rights reserved. US Patent 10,410,152