Splunk Enterprise Security

update asset list contents

riqbal47010
Path Finder

I have an asset list. the owner changed for several assets. Now I just want to change the owner name against specific category hosts.

MY inital query is :

| inputlookup asset_lookup.csv | search category="exch" | replace "abc" WITH "xyz" IN owner 

I tried with append but does not producing the required.

0 Karma

to4kawa
Ultra Champion
| makeresults
| eval _raw="category,owner
exch,abc
exch,def
send,ghi"
| multikv forceheader=1
| eval owner=if(category=="exch" AND owner=="abc","xyz",owner)

The answer has been corrected.
After this, you can update with outputcsv.

0 Karma

riqbal47010
Path Finder

hi

thanks for reverting back.
I want to update the same asset lookup with the outcome of the results.

for example. in the existing asset lookup the ower for network devices are man1.
but now ownership changed to owner2. so now how to update this information in asset lookup.

0 Karma

riqbal47010
Path Finder
https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Inputlookup

Referring above link the example 6 solve my problem.

0 Karma

to4kawa
Ultra Champion

The answer has been fixed. please confirm.

0 Karma

riqbal47010
Path Finder

yes
problem fixed.

thanks

0 Karma

to4kawa
Ultra Champion

Do you mean that you accepted the answer?

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


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

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

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...