Splunk Dev

How to search and get error log or info log

inventor2014
New Member

if want to get error log only or info log only, how to search and get with JSON

i am not familiar with
var mySearch = "search * | head 5";

do not know whether data are in ascending or descending in date

is head 5 meaning that the latest 5 records

Tags (2)
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Review this.

http://docs.splunk.com/Documentation/Splunk/6.0/Search/Usethesearchcommand

But to answer more completely, events are returned in latest to earliest (most recent to farthest back) order by default, and head 5 indicates you only want the first 5 events returned.

Ayn
Legend

Sounds like you really need to take the basic Splunk tutorial.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...