- Set the
SPLUNK_HOME
environment variable to the root directory of your Splunk instance. (/opt/splunk on centos in AWS)
-
Copy this whole
splunk_sqs
folder to$SPLUNK_HOME/etc/apps
. -
Open a terminal at
$SPLUNK_HOME/etc/apps/github_commits/bin/app
. -
Run
npm install
.If this step fails
- Copy the full
splunk-sdk-javascript
folder to$SPLUNK_HOME/etc/apps/github_commits/bin/app/node_modules
. - Rename this copied folder as
splunk-sdk
. - Run
npm install github
.
- Copy the full
-
Restart Splunk
- From Splunk Home, click the Settings menu. Under Data, click Data inputs, and find
Github commits
, the input you just added. Click Add new on that row.
- Click Add new and fill in:
name
(whatever name you want to give this input)owner
(the owner of the Github repository, this is a Github username or org name)repository
(the name of the Github repository)- (optional)
token
if using a private repository and/or to avoid Github's API limits. To get a Github API token visit the Github settings page and make sure therepo
andpublic_repo
scopes are selected.
- Save your input, and navigate back to Splunk Home.
- Do a search for
sourcetype=github_commits
and you should see some commits indexed, if your repository has a large number of commits indexing them may take a few moments.