Jenkins integration for Splunk On-Call 🔗
With hundreds of plugins in the Update Center, Jenkins integrates with practically every tool in the continuous integration and continuous delivery toolchain. The Splunk On-Call integration with Jenkins provides real-time contextual information regarding your builds directly into the timeline.
Requirements 🔗
This integration is compatible with the following versions of Splunk On-Call:
Starter
Growth
Enterprise
The remainder of this topic walks you through the Jenkins integration with Splunk On-Call.
注釈
There are two Jenkins integrations, this one with Splunk On-Call, and the Jenkins Delivery Insights Integration , which sends notifications to the Timeline about build status.
Splunk On-Call configuration 🔗
Navigate to the Integrations page and find the REST endpoint integration by visiting Integrations >> REST Endpoint.
Copy the REST endpoint URL to your clipboard.
Jenkins configuration 🔗
Select the build or deployment you want to add Splunk On-Call notifications for, then select Configure.
Under “Build,” select Add build step, then Execute shell.
Paste the following cURL command into the “Command” box. Make sure to replace the “SPLUNKONCALL_REST_ENDPOINT_URL” with the URL you copied from Splunk On-Call.
curl -X POST --header 'Accept: application/json' --data '{ "entity_id": "'${BUILD_NAME}'", "message_type": "INFO", "state_message": "Jenkins Build: '${BUILD_DISPLAY_NAME}' is underway", "BUILD_ID": "'${BUILD_ID}'" }' '**SPLUNKONCALL_REST_ENDPOINT_URL**'
To add additional Jenkins variables, select the available environment variables link to see the available list:
Save your configuration, then you are done.