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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...