Splunk Search

Identify duplicate values in a field

azulueta
New Member

Hi,

I am new to Splunk and am looking for a search that is able to identify duplicate field values. We have an issue in Tenable that assets have duplicate asset IDs. My initial search is:

index=tenable sourcetype=tenable:io:assets
| stats count by hostnames, agent_uuid

Lists hostnames with ther unique ID on a table. Need to just show hostnames with the same agent_uuid.

I don't know if I need to export this and put it on a lookup table and then compare the agent_uuid values from there and just show the duplicates but I was hoping for a more straight forward search to do this. 🙂

Thank you.

0 Karma

yeahnah
Motivator

Hi @azulueta 

Try the following query

index=tenable sourcetype=tenable:io:assets
| stats count values(hostnames) BY agent_uuid
| where count > 1

Hope that helps

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

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

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...