All Apps and Add-ons

Local Repositories?

jrokeach
Engager

I'm looking to index a local git repository (not stored on github). Is there a way that I can just point splunkgit to a .git directory to index?
Thanks.

Tags (2)
1 Solution

Petter_Eriksson
Splunk Employee
Splunk Employee

Yes you can!

Configure the "repo_addresses=" in "splunkgit.conf" to be the absolute local path to your local git repository.
I.e: repo_addresses=/Users/petterik/developer/local_project

Read more on configuration here, then try it out!


Let me know if you have any problems by either replying here or creating a github issue.

- Petter, dev for splunkgit

View solution in original post

Petter_Eriksson
Splunk Employee
Splunk Employee

Yes you can!

Configure the "repo_addresses=" in "splunkgit.conf" to be the absolute local path to your local git repository.
I.e: repo_addresses=/Users/petterik/developer/local_project

Read more on configuration here, then try it out!


Let me know if you have any problems by either replying here or creating a github issue.

- Petter, dev for splunkgit

Petter_Eriksson
Splunk Employee
Splunk Employee

I found that there was a bug with egrep on some platforms, which resulted in no data at all:
You might want to try the new version: http://splunk-base.splunk.com/apps/34028/splunkgit

0 Karma

Petter_Eriksson
Splunk Employee
Splunk Employee

Too get more detail on what's happnening:
You can do a search for "index=_internal fetch_git*" and you should see what's happening to the script that's indexing the git repository.
You can see something like what exit status it had, error message or (if successful) how much data was indexed

jrokeach
Engager

I'm still not having luck with it... I've tried both:
repo_addresses=/applData/backups/netconfig/.git
and repo_addresses=/applData/backups/netconfig

The first is the bare repository whereas the second is the local copy containing the repository:

[server]# ls -a /applData/backups/netconfig/
. .. files .git

I simply don't see any data indexed. Is there anything I can do to get more detail on what's happening?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...