Splunk Search

Can someone explain the parameters of <search>?

NickGrava
Engager

Hi Team!

Someone please explain to me what each parameter is responsible for in such a search tag:

<search>
<query>system="SWAP_total" host = crm.narsdade.com
| bin _time span=1d
| dedup _time
| eval requestLasts = requestLimit - requestCount
| table requestCount, requestLasts
| rename requestCount AS "Requests done", requestLasts AS "Requests to go"
| transpose
| eval foobar_slice = column + " (" + 'row 1'+")"
| fields foobar_slice, "row 1"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>

 

what is system..host.. and other attributes means for..

Labels (2)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

With the exception of requestLasts and foobar_slice which the programmer defined in the code, the rest are all from your raw data.  _time and host are essential fields that all Splunk data must have; _time is obvious, host usually reflects the source from which the event is reported from or for.  The rest of fields can only be explained by someone with intimate knowledge about the application that produces these events.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You can find all of the elements in the Dashboards and Visualizations manual (https://docs.splunk.com/Documentation/Splunk/9.0.1/Viz/PanelreferenceforSimplifiedXML#search).

The <query> element is the search for Splunk to perform.  To learn about what goes here, try the Search Tutorial manual (https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchTutorial/WelcometotheSearchTutorial) or the free training available at https://www.splunk.com/en_us/training/course-catalog.html?sort=Newest&filters=filterGroup1FreeCourse...

---
If this reply helps you, Karma would be appreciated.

yuanliu
SplunkTrust
SplunkTrust

With the exception of requestLasts and foobar_slice which the programmer defined in the code, the rest are all from your raw data.  _time and host are essential fields that all Splunk data must have; _time is obvious, host usually reflects the source from which the event is reported from or for.  The rest of fields can only be explained by someone with intimate knowledge about the application that produces these events.

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 ...