This add-on enables you to ingest your BitBucket data into Splunk to enhance your monitoring capabilities throughout your DevOps process.
There are 4 different sourcetypes captured using this add-on. These are:
• Repository Information
• Commits
• Commit File Change Summary
• Pull Requests
All these data sets are captured and stored in JSON form, with the add-on collecting information and storing it in Splunk against the updated date.
The security method used for this is the 3-LO method available with the BitBucket API. The API requires navigating the repositories against a user account, therefore it would be advised (although not necessary) to setup a separate splunk user in BitBucket as a first step. Instructions for setting up the integration are as follows:
1. Navigate to your account settings > OAuth
2. Select the option to Add consumer
3. Fill in your desired fields, please ensure to enter a value for Callback URL. This can be your own website, https://www.splunk.com, https://example.com. The only requirement is the address is a https address.
4. The following permissions are required
a. Repositories – Read
b. Pull Requests – Read
5. Save your new consumer. You should be supplied with a key and secret. N.B you may need to navigate to the OAuth setting screen again and expand the row containing your newly created consumer
6. Open a new browser and navigate to https://bitbucket.org/site/oauth2/authorize?client_id=YOUR_CONSUMER_KEY&response_type=code
7. You may be asked to authorise access before completing your redirection to your callback url.
8. Once you have navigated to your callback url, your auth code will be available in your browser within your url address (e.g. setting the callback url to https://www.splunk.com will produce the following url when it’s called: https://www.splunk.com/?code=YOUR_CODE_HERE. Make a note of this code as you will need it shortly!
9. Open Splunk and go to the bitbucket add-on
10. Open the configuration tab and enter your bitbucket api address in the Base URL input. If it is already correct, ensure this is confirmed by pressing save. It would also be advisable to set the logging level to DEBUG for the initial setup to confirm that everything is running as expected. This can be changed at anypoint.
11. Go to the inputs tab > Create New Input and fill in all fields.
12. The add-on should now be running as expected.
Bugfix for duplicate data
New field aliases for DevSplunkOps
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.