Splunk Search

Searching/Listing down all Installed App Usage, to find how which is the least used app.

jawk339
Engager

Hey all!

I am tasked to do some housekeeping and find out which installed apps are being used the least so that I can uninstall them.
Is there a search string I can use to list down all the apps to see which app is being used often or being used the least? 

Best Regards,
jawk339

Labels (1)
0 Karma
1 Solution

manjunathmeti
Champion

hi @jawk339,
The below query will give you how many times the apps are accessed. One more thing before uninstalling the least used apps you need to makes sure that the configurations (like web.conf, limits.conf, server.conf etc.) and knowledge objects (props.conf, macros.conf, transforms.conf, lookups etc.) in those apps are not used for anything.

index=_internal sourcetype="*access" 
    [| rest /services/apps/local 
    | where core=0 
    | fields title 
    | mvcombine delim=" OR " title 
    | return $title] 
| rex field=uri_path "servicesNS\/[^\/]+\/(?<app>[^\/]+)" 
| stats count by app 
| append 
    [| rest /services/apps/local 
    | where core=0 
    | table title 
    | rename title as app] 
| stats sum(count) as "Number of times used" by app 
| fillnull 
| sort -"Number of times used"

  

If this reply helps you, a like would be appreciated.

View solution in original post

jawk339
Engager

@manjunathmeti 
Thank you so much! That is exactly what I am looking for!! 😄

0 Karma

manjunathmeti
Champion

hi @jawk339,
The below query will give you how many times the apps are accessed. One more thing before uninstalling the least used apps you need to makes sure that the configurations (like web.conf, limits.conf, server.conf etc.) and knowledge objects (props.conf, macros.conf, transforms.conf, lookups etc.) in those apps are not used for anything.

index=_internal sourcetype="*access" 
    [| rest /services/apps/local 
    | where core=0 
    | fields title 
    | mvcombine delim=" OR " title 
    | return $title] 
| rex field=uri_path "servicesNS\/[^\/]+\/(?<app>[^\/]+)" 
| stats count by app 
| append 
    [| rest /services/apps/local 
    | where core=0 
    | table title 
    | rename title as app] 
| stats sum(count) as "Number of times used" by app 
| fillnull 
| sort -"Number of times used"

  

If this reply helps you, a like would be appreciated.

Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...