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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...