Alerting

Need to add value after extracting field

SS1
Path Finder

Hi,

 

I have the below base search,

index="appv" (sourcetype="AppV-User" *PUT /package*) OR (sourcetype=sql_appv_packageversion) | rex "\/packages\/\w+\/(?<Id>\w+)\s+-\s+\d+\s+(?<User>[^ ]+)" | stats dc(sourcetype) AS dc_sourcetype values(Name) AS Name values(User) AS User BY Id | where dc_sourcetype=2

Statistics of this search is as below,

Id      dc_sourcetype        Name                  User
323      2                            Putty v0.72          User A

I have extracted a field called 'Enabled' which has values of either Enabled=0 or Enabled=1

 

How do i update my search query so the table is shown as below

Id      dc_sourcetype        Name                  User        Enabled
323      2                            Putty v0.72          User A         0 or 1

Labels (5)
0 Karma

SS1
Path Finder

thanks for the response. I tried this query but Enabled is not giving any value

 

Id      dc_sourcetype        Name                  User        Enabled
323      2                            Putty v0.72          User A         

0 Karma

493669
Super Champion

@SS1  Does `Enabled` field is getting extracted already? if not then add `Enabled` field extraction logic before stats command.

0 Karma

493669
Super Champion

@SS1  you may want to use values(<fieldname>) as <newfieldname>  like below-

index="appv" (sourcetype="AppV-User" *PUT /package*) OR (sourcetype=sql_appv_packageversion) | rex "\/packages\/\w+\/(?<Id>\w+)\s+-\s+\d+\s+(?<User>[^ ]+)" | stats dc(sourcetype) AS dc_sourcetype values(Name) AS Name values(User) AS User values(Enabled) as Enabled BY Id | where dc_sourcetype=2
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...