Knowledge Management

how to create a calculated compliance field in splunk web

umsundar2015
Path Finder

Hi,

I need to create a calculated compliance field in splunk web.
the field should have the values like full, light,expanded and none in it.

Please help me out in creating this using eval function in step by step manner.

This is the first time i am creating this .

Regards,
Sundar

0 Karma

newbie2tech
Communicator

Hi umsundar2015 ,

Are the values "Full","Expanded" etc are already part of raw event which is ingested in splunk? If so you can use field extractions.

Settings-->Fields-->FieldExtractions-->choose source or source type and their respective value..choose sample event, select regular expression and then highlight the values "Full","Expanded"etc in the sample selected event and create a filed and change the permissions of this field extraction to app /global level...this will create new filed that you can select from left pane of in the search bar.

If this does not work...if you can share mock sample event of your usecase then we can take a look at it.

Let us know how it goes.

0 Karma

dineshraj9
Builder

Can you provide your base search?

0 Karma

umsundar2015
Path Finder

index=saesdp-server |fillnull|search status=Installed install_status=Installed company!=MNPD operational_status=Operational u_environment!=Dev u_environment!=Lab u_environment!=Dev u_environment!=Pilot u_environment!=QA os!="Windows" support_group!="MNDP" os!="os" u_os!="Windows" |eval name=lower(name)

This is my base search , which will be further joined with one more index

0 Karma

dineshraj9
Builder

And what is the logic for populating the compliance field?

0 Karma

umsundar2015
Path Finder

It should be included in search like this ,
index=saesdp-server |fillnull|search status=Installed install_status=Installed company!=MNPD operational_status=Operational u_environment!=Dev u_environment!=Lab u_environment!=Dev u_environment!=Pilot u_environment!=QA os!="Windows" support_group!="MNDP" os!="os" u_os!="Windows" |eval name=lower(name)
|eval calculated_compliance=if(calculated_compliance="Full","Full","Expanded")

Can you please help in creating this field ,

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...