Splunk Search

How to remove this signal "-" and "OTHER" in results of a timechart?

lucasdc
New Member

Hi Splunkers, I have this search bellow:

index=br_activedirectory_microsoft EventCode=4624 Account_Domain=AGBANESPA Account_Name=A* earliest=-169h latest=now()
| fields Account_Domain, Account_Name, Source_Network_Address
| dedup Account_Domain, Account_Name, Source_Network_Address
| lookup dnslookup clientip as Source_Network_Address OUTPUT clienthost
| eval user = substr(mvindex(Account_Name,1),2,4)
| eval hostname = substr(clienthost,3,4)
| where user !=hostname
| lookup new_hostname_lookup hostname as hostname OUTPUT ENDEREÇO, UF, REG, CEP , REDE
| lookup new_user_lookup user as user OUTPUT ENDEREÇO_user, UF_user, REG_user, CEP_user ,REDE_user
| where REG !=REG_user AND REDE !=REDE_user
| rename "Account_Name" as "Historico de logins com sucesso"
| timechart count by "Historico de logins com sucesso"

And the output is this:

![alt text

How do I remove from my search this "-" and "OTHER"??

Thanks!

0 Karma
1 Solution

Vijeta
Influencer

@lucasdc At the end of your search you can use fields - "OTHER" , "-".

<your query> | fields - OTHER, "-"

View solution in original post

0 Karma

Vijeta
Influencer

@lucasdc At the end of your search you can use fields - "OTHER" , "-".

<your query> | fields - OTHER, "-"
0 Karma

DavidHourani
Super Champion

Hi @lucasdc,

You can use the option useother=f for timechart to remove the OTHER column. I advise you as well to set the number of columns you want your timechart to show, it defaults to 10 with an OTHER column grouping the rest, you can change it by setting the limit parameter for timechart. You timechart would then look like this :

| timechart count by "Historico de logins com sucesso" useother=f limit=15

And to remove any other field you can use field -so it would be field - "-" to remove the "-" column. Your whole query becomes :

   ...| timechart count by "Historico de logins com sucesso" useother=f limit=15 | field - "-"

Let me know if that helps.

Cheers,
David

lucasdc
New Member

Thanks David! it's worked! you'r the man!

0 Karma

DavidHourani
Super Champion

Awesome ! please accept the answer and up-vote it 🙂

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...