Splunk Search

Lookup files permissions- Is there a way to view lookup file without changing permission in GUI?

Sanz
Explorer

Hi All,

I am trying to view a lookup file that has the sharing set on this app only from another app than it is defined.

Is there anyway to achieve this without changing the permission in the GUI?
This is the SPL i'm running but it skips the lookup files that aren't being shared.

Maybe temporary set the sharing to global and set it back or something 

| rest splunk_server=local /servicesNS/-/-/data/lookup-table-files
| fields title eai:acl.owner eai:acl.app
| where !match(title,"\.mlmodel")
| rename eai:acl.* as *
| map [ | inputlookup $title$
| foreach * [ | eval b_<<FIELD>>=len(<<FIELD>>) + 1 ]
| addtotals b_* fieldname=b | stats sum(eval(b/1024/1024)) as mb
| eval name="$title$", owner="$owner$", app="$app$" ] maxsearches=1000
Labels (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

I think your question is whether SPL can alter scope of settings.  It cannot.  Out of curiosity, what is the use case here?  Why is it so important that you do not change permission?

0 Karma

Sanz
Explorer

I wanted to get a list of the sizes of all lookup files to see which ones are very large. Some of the lookup files are set to app only and the SPL doesn't work. 

0 Karma

yuanliu
SplunkTrust
SplunkTrust

It would be really easy to do that on the command line.  If you don't have command line access, another method could be to use the REST API directly: data/lookup-table-files.  

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...