Searching in Splunk

  • Searching on Splunk is quite simple.
  • Just login to your Splunk Enterprise installation, navigate to App: Search & Reporting.
  • It will bring you to a new web page which is basically our search head.
  • Type in your query and you are done.
    • All your events which matched your query will be presented on your screen,
  • If you will notice below, the query which I have used have nothing much its just searching all the events from "idx_messages" index < remember we added a monitor on one of our remote host to forward the data to idx_messages index  >.









  • Based on above search it resulted in 1068 events in last 7 days.
  • Field names are case sensitive.
  • Field values are not case sensitive, if used without single quotes.

i.e. below queries with give us same results:
  • index=idx_messages date_wday=monday 
  • index=idx_messages date_wday=MONDAY
  • index=idx_messages date_wday="MONDAY"

    But if I use below query it might not give me intended results:
    • index=idx_messages date_wday='MONDAY'
    Therefore make sure, you are validating the results which you are getting, also never run a search for "All Time" this will greatly use your compute resources. If it is really needed and your project demands for it, than only go for it otherwise avoid this.

    Comments

    Popular posts from this blog

    #3 Splunk sub(Commands) [eval, round, trim, stats, ceil, exact, floor, tostring]

    #6 Splunk sub(Commands) [fields, rename, replace, table, transaction]

    #2 Splunk sub(Commands) [eval, trim, chart, showperc, stats, avg]