SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
Eventtypes
                                Quick Reference Guide                                       Eventtypes are cross-referenced searches that categorize events at search time.
                                                                                            For example, if you have defined an eventtype called "problem" that has a search
                                                                                            definition of "error OR warn OR fatal OR fail", any time you do a search where a result
CONCEPTS                                                                                    contains error, warn, fatal, or fail, the event will have an eventtype field/value with
                                                                                            eventtype=problem. So, for example, if you were searching for "login", the logins
Overview                                                                                    that had problems would get annotated with eventtype=problem. Eventtypes
                                                                                            are essentially dynamic tags that get attached to an event if it matches the search
Index-time Processing: Splunk reads data from a source, such as a file or port, on          definition of the eventtype.
a host (e.g. "my machine"), classifies that source into a sourcetype (e.g., "syslog",
"access_combined", "apache_error", ...), then extracts timestamps, breaks up the            Reports/Dashboards
source into individual events (e.g., log events, alerts, …), which can be a single-line
or multiple lines, and writes each event into an index on disk, for later retrieval with    Search results with formatting information (e.g., as a table or chart) are informally
a search.                                                                                   referred to as reports, and multiple reports can be placed on a common page, called
                                                                                            a dashboard.
Search-time Processing: When a search starts, matching indexed events are
retrieved from disk, fields (e.g., code=404, user=david,...) are extracted from
the event's text, and the event is classified by matching against eventtype definitions
                                                                                            Apps                            Go to splunkbase.com/apps to download apps

(e.g., 'error', 'login', ...). The events returned from a search can then be                Apps are collections of Splunk configurations, objects, and code, allowing you to
powerfully transformed using Splunk's search language to generate reports that live         build different environments that sit on top of Splunk. You can have one app for
on dashboards.                                                                              troubleshooting email servers, one app for web analysis, and so on.

Events                                                                                      Permissions/Users/Roles
An event is a single entry of data. In the context of log file, this is an event in a Web   Saved Splunk objects, such as savedsearches, eventtypes, reports, and tags,
activity log:                                                                               enrich your data, making it easier to search and understand. These objects have
                                                                                            permissions and can be kept private or shared with other users, via roles (e.g.,
  173.26.34.223 - - [01/Jul/2009:12:05:27 -0700] "GET /                                     "admin", "power", "user"). A role is a set of capabilities that you can define, like
  trade/app?action=logout HTTP/1.1" 200 2953                                                whether or not someone is allowed to add data or edit a report. Splunk with a Free
                                                                                            License does not support user authentication.
More specifically, an event is a set of values associated with a timestamp. While
many events are short and only take up a line or two, others can be long, such as a
whole text document, a config file, or whole java stack trace. Splunk uses line-            Transactions
breaking rules to determine how it breaks these events up for display in the search
                                                                                            A transaction is a set of events grouped into one event for easier analysis. For
results.
                                                                                            example, given that a customer shopping at an online store would generate web
                                                                                            access events with each click that each share a SessionID, it could be convenient to
Sources/Sourcetypes                                                                         group all of his events together into one transaction. Grouped into one transaction
                                                                                            event, it’s easier to generate statistics like how long shoppers shopped, how many
A source is the name of the file, stream, or other input from which a particular event      items they bought, which shoppers bought items and then returned them, etc.
originates – for example, /var/log/messages or UDP:514. Sources are classified into
sourcetypes, which can either be well known, such as access_combined (HTTP Web
server logs), or can be created on the fly by Splunk when it sees a source with data        Forwarder/Indexer
and formatting it hasn’t seen before. Events with the same sourcetype can come
                                                                                            A forwarder is a version of Splunk that allows you to send data to a central Splunk
from different sources—events from the file /var/log/messages and from a syslog
                                                                                            indexer or group of indexers. An indexer provides indexing capability for local and
input on udp:514 can both have sourcetype=linux_syslog.
                                                                                            remote data.

Hosts
A host is the name of the physical or virtual device where an event originates. Host
provides an easy way to find all data originating from a given device.

Indexes
When you add data to Splunk, Splunk processes it, breaking the data into individual
events, timestamps them, and then stores them in an index, so that it can be later
searched and analyzed. By default, data you feed to Splunk is stored in the "main"
index, but you can create and specify other indexes for Splunk to use for different
data inputs.

Fields
Fields are searchable name/value pairings in event data. As Splunk processes events
at index time and search time, it automatically extracts fields. At index time, Splunk
extracts a small set of default fields for each event, including host, source, and
sourcetype. At search time, Splunk extracts what can be a wide range of fields from
the event data, including user-defined patterns as well as obvious field name/value
pairs such as user_id=jdoe.

Tags
Tags are aliases to field values. For example, if there are two host names that refer
to the same computer, you could give both of those host values the same tag (e.g.,
"hall9000"), and then if you search for that tag (e.g., "hal9000"), Splunk will return
events involving both host name values.
SEARCH LANGUAGE                                                                               COMMON SEARCH COMMANDS
A search is a series of commands and arguments, each chained together with "|"                   COMMAND              DESCRIPTION
(pipe) character that takes the output of one command and feeds it into the next
command on the right.                                                                              chart/
                                                                                                timechart           Returns results in a tabular output for (time-series) charting.

   search-args | cmd1 cmd-args | cmd2 cmd-args | ...
                                                                                                        dedup       Removes subsequent results that match a specified criterion.
Search commands are used to take indexed data and filter unwanted information,
extract more information, calculate values, transform, and statistically analyze. The
search results retrieved from the index can be thought of as a dynamically created                        eval Calculates an expression. (See EVAL FUNCTIONS table.)
table. Each search command redefines the shape of that table. Each indexed event
is a row, with columns for each field value. Columns include basic information about
the data as well as columns that are dynamically extracted at search-time.
                                                                                                        fields Removes fields from search results.
At the head of each search is an implied search-the-index-for-events command,
which can be used to search for keywords (e.g., error), boolean expressions
(e.g., (error OR failure) NOT success), phrases (e.g., "database                                 head/tail          Returns the first/last N results.
error"), wildcards (e.g., fail* will match fail, fails, failure, etc.), field values (e.g.,
code=404), inequality (e.g., code!=404 or code>200), a field having any value
or no value (e.g., code=* or NOT code=*). For example, the search:                                     lookup       Adds field values from an external source.

    sourcetype="access_combined" error | top 10 uri
                                                                                                      rename Renames a specified field; wildcards can be used to specify
                                                                                                                    multiple fields.
will retrieve indexed access_combined events from disk that contain the term
"error" (ANDs are implied between search terms), and then for those events,
report the top 10 most common URI values.                                                             replace       Replaces values of specified fields with a specified new value.

Subsearches                                                                                                 rex     Specifies regular expression named groups to extract fields.
A subsearch is an argument to a command that runs its own search, returning those
results to the parent command as the argument value. Subsearches are contained
in square brackets. For example, finding all syslog events from the user that had the                  search Filters results to those that match the search expression.
last login error:

sourcetype=syslog [search login error | return user]                                                      sort      Sorts search results by the specified fields.

Note that the subsearch returns one user value, because by default the "return"
command just returns one value, but there are options for more (e.g., | return                           stats Provides statistics, grouped optionally by fields.
5 user).

Relative Time Modifiers                                                                            top/rare Displays the most/least common values of a field.
Besides using the custom-time ranges in the user-interface, you can specify in
your search the time ranges of retrieved events with the latest and earliest                  transaction           Groups search results into transactions.
search modifiers. The relative times are specified with a string of characters that
indicate amount of time (integer and unit) and, optionally, a "snap to" time unit:

[+|-]<time_integer><time_unit>@<snap_time_unit>
                                                                                              Optimizing Searches
For example: "error earliest=-1d@d latest=-1h@h" will retrieve events                         The key to fast searching is to limit the data that needs to be pulled off disk to an
containing "error" that occurred from yesterday (snapped to midnight) to the                  absolute minimum, and then to filter that data as early as possible in the search so
last hour (snapped to the hour).                                                              that processing is done on the minimum data necessary.

Time Units: specified as second (s), minute(m), hour(h), day(d), week(w),                     Partition data into separate indexes, if you’ll rarely perform searches across multiple
month(mon), quarter(q), year(y). "time_integer" defaults to 1 (e.g., "m" is the same as       types of data. For example, put web data in one index, and firewall data in another.
"1m").

Snapping: indicates the nearest or latest time to which your time amount rounds                   •   Search as specifically as you can (e.g. fatal_error, not *error*)
down. Snaps rounds down to the latest time not after the specified time. For
example, if it is 11:59:00 and you "snap to" hours (@h), you will snap to 11:00 not               •   Limit the time range to only what’s needed (e.g., -1h not -1w)
12:00. You can "snap to" a specific day of the week: use @w0 for Sunday, @w1 for
Monday, etc.                                                                                      •   Filter out unneeded fields as soon as possible in the search.

                                                                                                  •   Filter out results as soon as possible before calculations.

                                                                                                  •
                                              Community                                               For report generating searches, use the Advanced Charting view, and
                                                                                                      not the Flashtimeline view, which calculates timelines.

                        ask questions, find answers.                                              •   On Flashtimeline, turn off ‘Discover Fields’ when not needed.
                        download apps, share yours.
                                                                                                  •   Use summary indexes to pre-calculate commonly used values.
                               splunkbase.com
                                                                                                  •   Make sure your disk I/O is the fastest you have available.
SEARCH EXAMPLES
Filter Results                                                             Add Fields
Filter results to only include those with                                                                                … | eval velocity=distance/
                                            … | search fail status=0       Set velocity to distance / time.
"fail" in their raw text and status=0.                                                                                   time

Remove duplicates of results with the                                      Extract "from" and "to" fields using
                                            … | dedup host                                                               … | rex field=_raw "From:
same host value.                                                           regular expressions. If a raw event
                                                                           contains "From: Susan To: David", then        (?<from>.*) To: (?<to>.*)"
Keep only search results whose "_raw"       … | regex _raw="(?<!d)10.    from=Susan and to=David.
field contains IP addresses in the non-     d{1,3}.d{1,3}.d{1,3}
routable class A (10.0.0.0/8).              (?!d)"                        Save the running total of "count" in a        … | accum count as total_
                                                                           field called "total_count".                   count
Group Results
                                                                           For each event where 'count' exists,
Cluster results together, sort by their     … | cluster t=0.9
                                                                           compute the difference between count
"cluster_count" values, and then return     showcount=true | sort                                                        … | delta count as countdiff
                                                                           and its previous value and store the
the 20 largest clusters (in data size).     limit=20 -cluster_count
                                                                           result in 'countdiff'.
Group results that have the same "host"                                    Filter Fields
and "cookie", occur within 30 seconds
                                            … | transaction host cookie
of each other, and do not have a pause                                     Keep the "host" and "ip" fields, and
                                            maxspan=30s maxpause=5s                                                      … | fields + host, ip
greater than 5 seconds between each                                        display them in the order: "host", "ip".
event into a transaction.
                                                                           Remove the "host" and "ip" fields.            … | fields - host, ip
Group results with the same IP address
                                            … | transaction clientip
(clientip) and where the first result
                                            startswith="signon"            Modify Fields
contains "signon", and the last result
                                            endswith="purchase"
contains "purchase".
                                                                           Rename the "_ip" field as "IPAddress".        … | rename _ip as IPAddress
Order Results
Return the first 20 results.                … | head 20                    Change any host value that ends with          … | replace *localhost with
                                                                           "localhost" to "mylocalhost".                 mylocalhost in host
Reverse the order of a result set.          … | reverse
                                                                           Multi-Valued Fields
Sort results by "ip" value (in ascending
                                                                           Combine the multiple values of the
order) and then by "url" value              … | sort ip, -url                                                            … | nomv recipients
                                                                           recipients field into a single value
(in descending order).
                                                                           Separate the values of the "recipients"
Return the last 20 results                                                                                               … | makemv delim=","
                                            … | tail 20                    field into multiple field values,
(in reverse order).                                                                                                      recipients | top recipients
                                                                           displaying the top recipients
Reporting                                                                  Create new results for each value of the
                                                                                                                         … | mvexpand recipients
                                            … | anomalousvalue             multivalue field "recipients"
Return events with uncommon values.
                                            action=filter pthresh=0.02
                                                                           For each result that is identical except      … | fields EventCode,
                                                                           for that RecordNumber, combine them,          Category, RecordNumber
Return the maximum "delay" by "size",
                                            … | chart max(delay) by size   setting RecordNumber to be a multi-           | mvcombine delim=","
where "size" is broken down into a
                                            bins=10                        valued field with all the varying values.     RecordNumber
maximum of 10 equal sized buckets.
                                                                                                                         … | eval to_count =
Return max(delay) for each value of foo     … | chart max(delay) over      Find the number of recipient values
                                                                                                                         mvcount(recipients)
split by the value of bar.                  foo by bar
                                                                           Find the first email address in the           … | eval recipient_first =
                                            … | chart max(delay) over      recipient field                               mvindex(recipient,0)
Return max(delay) for each value of foo.
                                            foo
                                                                                                                         … | eval netorg_recipients
Remove all outlying numerical values.       … | outlier                    Find all recipient values that end in .net    = mvfilter(match(recipient,
                                                                           or .org                                       ".net$") OR match(recipient,
Remove duplicates of results with the                                                                                    ".org$"))
same "host" value and return the total      … | stats dc(host)
count of the remaining results.                                            Find the combination of the values of         … | eval newval =
                                                                           foo, "bar", and the values of baz             mvappend(foo, "bar", baz)
Return the average for each hour, of any
                                            … | stats avg(*lay) by date_                                                 … | eval orgindex =
unique field that ends with the string                                     Find the index of the first recipient value
                                            hour                                                                         mvfind(recipient, ".org$")
"lay" (e.g., delay, xdelay, relay, etc).                                   match ".org$"

Calculate the average value of "CPU"        … | timechart span=1m          Lookup Tables
each minute for each "host".                avg(CPU) by host
                                                                           Lookup the value of each event's 'user'
                                                                                                                         … | lookup usertogroup user
Create a timechart of the count of from                                    field in the lookup table usertogroup,
                                            … | timechart count by host                                                  output group
"web" sources by "host"                                                    setting the event's 'group' field.

Return the 20 most common values of                                        Write the search results to the lookup
                                            … | top limit=20 url                                                         … | outputlookup users.csv
the "url" field.                                                           file "users.csv".

Return the least common values of the                                      Read in the lookup file "users.csv" as
                                            … | rare url                                                                 … | inputlookup users.csv
"url" field.                                                               search results.
The eval command calculates an expression and puts the resulting value into a field (e.g. "...| eval force = mass * acceleration").
EVAL FUNCTIONS           The following table lists the functions eval understands, in addition to basic arithmetic operators (+ - * / %), string concatenation
                         (e.g., '...| eval name = last . ", " . last'), boolean operations (AND OR NOT XOR < > <= >= != = == LIKE).

         FUNCTION   DESCRIPTION                                                                   EXAMPLES
          abs(X)    Returns the absolute value of X.                                              abs(number)
                    Takes pairs of arguments X and Y, where X arguments are Boolean               case(error == 404, "Not found", error ==
   case(X,"Y",…)    expressions that, when evaluated to TRUE, return the corresponding Y          500,"Internal Server Error", error ==
                    argument.                                                                     200, "OK")

         ceil(X)    Ceiling of a number X.                                                        ceil(1.9)
cidrmatch("X",Y)    Identifies IP addresses that belong to a particular subnet.                   cidrmatch("123.132.32.0/25",ip)
   coalesce(X,…)    Returns the first value that is not null.                                     coalesce(null(), "Returned val", null())
                    Evaluates an expression X using double precision floating point
        exact(X)    arithmetic.
                                                                                                  exact(3.14*num)

           exp(X)   Returns eX.                                                                   exp(3)
         floor(X)   Returns the floor of a number X.                                              floor(1.9)
                    If X evaluates to TRUE, the result is the second argument Y. If X
       if(X,Y,Z)    evaluates to FALSE, the result evaluates to the third argument Z.
                                                                                                  if(error==200, "OK", "Error")

       isbool(X)    Returns TRUE if X is Boolean.                                                 isbool(field)
        isint(X)    Returns TRUE if X is an integer.                                              isint(field)
    isnotnull(X)    Returns TRUE if X is not NULL.                                                isnotnull(field)
       isnull(X)    Returns TRUE if X is NULL.                                                    isnull(field)
        isnum(X)    Returns TRUE if X is a number.                                                isnum(field)
         isstr()    Returns TRUE if X is a string.                                                isstr(field)
          len(X)    This function returns the character length of a string X.                     len(field)
     like(X,"Y")    Returns TRUE if and only if X is like the SQLite pattern in Y.                like(field, "foo%")
           ln(X)    Returns its natural log.                                                      ln(bytes)
                    Returns the log of the first argument X using the second argument Y as
        log(X,Y)    the base. Y defaults to 10.
                                                                                                  log(number,2)

        lower(X)    Returns the lowercase of X.                                                   lower(username)
                    Returns X with the characters in Y trimmed from the left side. Y defaults
      ltrim(X,Y)    to spaces and tabs.
                                                                                                  ltrim(" ZZZabcZZ ", " Z")

      match(X,Y)    Returns if X matches the regex pattern Y.                                     match(field, "^d{1,3}.d$")
        max(X,…)    Returns the max.                                                              max(delay, mydelay)
           md5(X)   Returns the MD5 hash of a string value X.                                     md5(field)
        min(X,…)    Returns the min.                                                              min(delay, mydelay)
      mvcount(X)    Returns the number of values of X.                                            mvcount(multifield)
      mvfilter(X)   Filters a multi-valued field based on the Boolean expression X.               mvfilter(match(email, "net$"))
                    Returns a subset of the multivalued field X from start position (zero-
  mvindex(X,Y,Z)    based) Y to Z (optional).
                                                                                                  mvindex( multifield, 2)

                    Given a multi-valued field X and string delimiter Y, and joins the
     mvjoin(X,Y)    individual values of X using Y.
                                                                                                  mvjoin(foo, ";")

           now()    Returns the current time, represented in Unix time.                           now()
          null()    This function takes no arguments and returns NULL.                            null()
                    Given two arguments, fields X and Y, and returns the X if the arguments
     nullif(X,Y)    are different; returns NULL, otherwise.
                                                                                                  nullif(fieldA, fieldB)

            pi()    Returns the constant pi.                                                      pi()
        pow(X,Y)    Returns X .
                              Y                                                                   pow(2,10)
        random()    Returns a pseudo-random number ranging from 0 to 2147483647.                  random()
   relative_time    Given epochtime time X and relative time specifier Y, returns the
                                                                                                  relative_time(now(),"-1d@d")
           (X,Y)    epochtime value of Y applied to X.
                                                                                                  Returns date with the month and day
                                                                                                  numbers switched, so if the input was
                    Returns a string formed by substituting string Z for every occurrence of
  replace(X,Y,Z)    regex string Y in string X.
                                                                                                  1/12/2009 the return value would be
                                                                                                  12/1/2009: replace(date, "^(d{1,2})/
                                                                                                  (d{1,2})/", "2/1/")
                    Returns X rounded to the amount of decimal places specified by Y. The
      round(X,Y)    default is to round to an integer.
                                                                                                  round(3.5)

                    Returns X with the characters in Y trimmed from the right side.
      rtrim(X,Y)    If Y is not specified, spaces and tabs are trimmed.
                                                                                                  rtrim(" ZZZZabcZZ ", " Z")
EVAL FUNCTIONS (continued)
       FUNCTION    DESCRIPTION                                                                       EXAMPLES
 searchmatch(X)    Returns true if the event matches the search string X.                            searchmatch("foo AND bar")
   split(X,"Y")    Returns X as a multi-valued field, split be delimiter Y.                          split(foo, ";")
        sqrt(X)    Returns the square root of X.                                                     sqrt(9)
  strftime(X,Y)    Returns epochtime value X rendered using the format specified by Y.               strftime(_time, "%H:%M")
                   Given a time represented by a string X, returns value parsed from
  strptime(X,Y)    format Y.
                                                                                                     strptime(timeStr, "%H:%M")

                   Returns a substring field X from start position (1-based) Y for Z                 substr("string", 1, 3)
  substr(X,Y,Z)    (optional) characters.                                                            +substr("string", -3)
         time()    Returns the wall-clock time with microsecond resolution.                          time()
                   Converts input string X to a number, where Y (optional, defaults to 10)
  tonumber(X,Y)    defines the base of the number to convert to.
                                                                                                     tonumber("0A4",16)

                   Returns a field value of X as a string. If the value of X is a number, it
                   reformats it as a string; if a Boolean value, either "True" or "False". If X is   This example returns:
                   a number, the second argument Y is optional and can either be "hex"               foo=615 and foo2=00:10:15:
  tostring(X,Y)    (convert X to hexadecimal), "commas" (formats X with commas and                   … | eval foo=615 | eval foo2 = tostring(foo,
                   2 decimal places), or "duration" (converts seconds X to readable time             "duration")
                   format HH:MM:SS).
                   Returns X with the characters in Y trimmed from both sides.
      trim(X,Y)    If Y is not specified, spaces and tabs are trimmed.
                                                                                                     trim(" ZZZZabcZZ ", " Z")

                                                                                                     This example returns:
                                                                                                     "NumberStringBoolInvalid":
      typeof(X)    Returns a string representation of its type.
                                                                                                     typeof(12)+ typeof("string")+ typeof(1==2)+
                                                                                                     typeof(badfield)
       upper(X)    Returns the uppercase of X.                                                       upper(username)
                                                                                                     urldecode("http%3A%2F%2Fwww.splunk.
   urldecode(X)    Returns the URL X decoded.
                                                                                                     com%2Fdownload%3Fr%3Dheader")
                   Given pairs of arguments, Boolean expressions X and strings Y, returns            validate(isint(port), "ERROR: Port is not
validate(X,Y,…)    the string Y corresponding to the first expression X that evaluates to            an integer", port >= 1 AND port <= 65535,
                   False and defaults to NULL if all are True.                                       "ERROR: Port is out of range")


COMMON STATS FUNCTIONS                                     Common statistical functions used with the chart, stats, and timechart commands. Field names
                                                           can be wildcarded, so avg(*delay) might calculate the average of the delay and xdelay fields.

       FUNCTION    DESCRIPTION
         avg(X)    Returns the average of the values of field X.

       count(X)    Returns the number of occurrences of the field X. To indicate a specific field value to match, format X as eval(field="value").

          dc(X)    Returns the count of distinct values of the field X.

        first(X)   Returns the first seen value of the field X. In general, the first seen value of the field is the chronologically most recent instance of field.

        last(X)    Returns the last seen value of the field X.

        list(X)    Returns the list of all values of the field X as a multi-value entry. The order of the values reflects the order of input events.

         max(X)    Returns the maximum value of the field X. If the values of X are non-numeric, the max is found from lexicographic ordering.

      median(X)    Returns the middle-most value of the field X.

         min(X)    Returns the minimum value of the field X. If the values of X are non-numeric, the min is found from lexicographic ordering.

        mode(X)    Returns the most frequent value of the field X.

     perc<X>(Y)    Returns the X-th percentile value of the field Y. For example, perc5(total) returns the 5th percentile value of a field "total".

       range(X)    Returns the difference between the max and min values of the field X.

       stdev(X)    Returns the sample standard deviation of the field X.

      stdevp(X)    Returns the population standard deviation of the field X.

         sum(X)    Returns the sum of the values of the field X.

       sumsq(X)    Returns the sum of the squares of the values of the field X.

      values(X)    Returns the list of all distinct values of the field X as a multi-value entry. The order of the values is lexicographical.

         var(X)    Returns the sample variance of the field X.
REGULAR EXPRESSIONS (REGEXES)                                                             Regular Expressions are useful in multiple areas: search commands regex and rex;
                                                                                          eval functions match() and replace(); and in field extraction.

 REGEX                       NOTE                                     EXAMPLE                                              EXPLANATION
 s                          white space                              dsd                                               digit space digit

 S                          not white space                          dSd                                               digit non-whitespace digit

 d                          digit                                    ddd-dd-dddd                                 SSN

 D                          not digit                                DDD                                               three non-digits

 w                          word character (letter, number, or _ )   www                                               three word chars

 W                          not a word character                     WWW                                               three non-word chars

 [...]                       any included character                   [a-z0-9#]                                            any char that is a thru z, 0 thru 9, or #

 [^...]                      no included character                    [^xyx]                                               any char but x, y, or z

 *                           zero or more                             w*                                                  zero or more words chars

 +                           one or more                              d+                                                  integer

 ?                           zero or one                              ddd-?dd-?dddd                               SSN with dashes being optional

 |                           or                                       w|d                                                word or digit character

 (?P<var> ...)               named extraction                         (?P<ssn>ddd-dd-dddd)                       pull out a SSN and assign to 'ssn' field

 (?: ... )                   logical grouping                         (?:w|d)|(?:d|w)                                  word-char then digit OR digit then word-char

 ^                           start of line                            ^d+                                                 line begins with at least one digit

 $                           end of line                              d+$                                                 line ends with at least one digit

 {...}                       number of repetitions                    d{3,5}                                              between 3-5 digits

                            escape                                   [                                                   escape the [ char

 (?= ...)                    lookahead                                (?=D)error                                          "error" must be preceded by a non-digit

 (?! ...)                    negative lookahead                       (?!d)error                                          "error" cannot be preceded by a digit

COMMON SPLUNK STRPTIME FORMATS
strptime formats are useful for eval functions strftime() and strptime(), and for timestamping of event data.

                                      %H                       24 hour (leading zeros) (00 to 23)
                                      %I                       12 hour (leading zeros) (01 to 12)
                                      %M                       Minute (00 to 59)
                                      %S                       Second (00 to 61)
      Time                                                     subseconds with width (%3N = millisecs,
                                      %N
                                                               %6N = microsecs, %9N = nanosecs)
                                      %p                       AM or PM
                                      %Z                       Time zone (GMT)
                                      %s                       Seconds since 1/1/1970 (1308677092)
                                      %d                       Day of month (leading zeros) (01 to 31)
                                      %j                       Day of year (001 to 366)
      Days                            %w                       Weekday (0 to 6)
                                      %a                       Abbreviated weekday (Sun)
                                      %A                       Weekday (Sunday)
                                      %b                       Abbreviated month name (Jan)
     Months                           %B                       Month name (January)                                                    Splunk Inc.
                                      %m                       Month number (01 to 12)                                             250 Brannan Street
                                      %y                       Year without century (00 to 99)
                                                                                                                                 San Francisco, CA 94107
     Years
                                      %Y                       Year (2008)
                   %Y-%m-%d                                    1998-12-31                                                            www.splunk.com
                   %y-%m-%d                                    98-12-31
  Examples         %b %d, %Y                                   Jan 24, 2003
                   %B %d, %Y                                   January 24, 2003                                              Copyright © 2011 Splunk Inc. All rights reserved.
                   q|%d %b '%y = %Y-%m-%d|                     q|25 Feb '03 = 2003-02-25|

Weitere ähnliche Inhalte

Andere mochten auch

Proffessional irish[1]
Proffessional irish[1]Proffessional irish[1]
Proffessional irish[1]carter4277
 
Presentatie Monique Verdier - Cultuur 2.1
Presentatie Monique Verdier - Cultuur 2.1Presentatie Monique Verdier - Cultuur 2.1
Presentatie Monique Verdier - Cultuur 2.1MaartenSchuth
 
What is Risk? - lightning talk for software testers (2011)
What is Risk? - lightning talk for software testers (2011)What is Risk? - lightning talk for software testers (2011)
What is Risk? - lightning talk for software testers (2011)Neil Thompson
 
Thriller seqeunce pitch
Thriller seqeunce pitchThriller seqeunce pitch
Thriller seqeunce pitchcharwolfefilm
 
Projeto Ruth Rocha
Projeto Ruth RochaProjeto Ruth Rocha
Projeto Ruth Rochagracigomes
 
Anwendungsfälle für Elasticsearch JAX 2015
Anwendungsfälle für Elasticsearch JAX 2015Anwendungsfälle für Elasticsearch JAX 2015
Anwendungsfälle für Elasticsearch JAX 2015Florian Hopf
 
33d Infantry Brigade Crosswire Issue 5
33d Infantry Brigade Crosswire Issue 533d Infantry Brigade Crosswire Issue 5
33d Infantry Brigade Crosswire Issue 533rdibctpao
 
CV_ Avikalp Mishra_2015
CV_ Avikalp Mishra_2015CV_ Avikalp Mishra_2015
CV_ Avikalp Mishra_2015Avikalp Mishra
 
More About InnoSeal Systems- Tamper Evident Bag Sealer
More About InnoSeal Systems- Tamper Evident Bag SealerMore About InnoSeal Systems- Tamper Evident Bag Sealer
More About InnoSeal Systems- Tamper Evident Bag SealerChristy_innoseal
 

Andere mochten auch (14)

Regulations
RegulationsRegulations
Regulations
 
Proffessional irish[1]
Proffessional irish[1]Proffessional irish[1]
Proffessional irish[1]
 
Presentatie Monique Verdier - Cultuur 2.1
Presentatie Monique Verdier - Cultuur 2.1Presentatie Monique Verdier - Cultuur 2.1
Presentatie Monique Verdier - Cultuur 2.1
 
What is Risk? - lightning talk for software testers (2011)
What is Risk? - lightning talk for software testers (2011)What is Risk? - lightning talk for software testers (2011)
What is Risk? - lightning talk for software testers (2011)
 
Tissues
TissuesTissues
Tissues
 
Thriller seqeunce pitch
Thriller seqeunce pitchThriller seqeunce pitch
Thriller seqeunce pitch
 
Projeto Ruth Rocha
Projeto Ruth RochaProjeto Ruth Rocha
Projeto Ruth Rocha
 
Anwendungsfälle für Elasticsearch JAX 2015
Anwendungsfälle für Elasticsearch JAX 2015Anwendungsfälle für Elasticsearch JAX 2015
Anwendungsfälle für Elasticsearch JAX 2015
 
Tooth coloring 2
Tooth coloring 2Tooth coloring 2
Tooth coloring 2
 
Bio dat21
Bio dat21Bio dat21
Bio dat21
 
33d Infantry Brigade Crosswire Issue 5
33d Infantry Brigade Crosswire Issue 533d Infantry Brigade Crosswire Issue 5
33d Infantry Brigade Crosswire Issue 5
 
CV_ Avikalp Mishra_2015
CV_ Avikalp Mishra_2015CV_ Avikalp Mishra_2015
CV_ Avikalp Mishra_2015
 
More About InnoSeal Systems- Tamper Evident Bag Sealer
More About InnoSeal Systems- Tamper Evident Bag SealerMore About InnoSeal Systems- Tamper Evident Bag Sealer
More About InnoSeal Systems- Tamper Evident Bag Sealer
 
Adj new
Adj newAdj new
Adj new
 

Ähnlich wie Quick Reference Guide to Splunk Eventtypes

SplunkLive! - Getting started with Splunk
SplunkLive! - Getting started with SplunkSplunkLive! - Getting started with Splunk
SplunkLive! - Getting started with SplunkSplunk
 
Splunk .conf2011: Search Language: Intermediate
Splunk .conf2011: Search Language: IntermediateSplunk .conf2011: Search Language: Intermediate
Splunk .conf2011: Search Language: IntermediateErin Sweeney
 
Getting started with Splunk - Break out Session
Getting started with Splunk - Break out SessionGetting started with Splunk - Break out Session
Getting started with Splunk - Break out SessionGeorg Knon
 
Getting started with Splunk
Getting started with SplunkGetting started with Splunk
Getting started with SplunkSplunk
 
Osdc Complex Event Processing
Osdc Complex Event ProcessingOsdc Complex Event Processing
Osdc Complex Event ProcessingMichael Neale
 
Mythbusters: Event Stream Processing v. Complex Event Processing
Mythbusters: Event Stream Processing v. Complex Event ProcessingMythbusters: Event Stream Processing v. Complex Event Processing
Mythbusters: Event Stream Processing v. Complex Event ProcessingTim Bass
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseSplunk
 
Apache UIMA Introduction
Apache UIMA IntroductionApache UIMA Introduction
Apache UIMA IntroductionTommaso Teofili
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Netgramana
 
Proposed Event Processing Definitions ,September 20, 2006
Proposed Event Processing Definitions,September 20, 2006Proposed Event Processing Definitions,September 20, 2006
Proposed Event Processing Definitions ,September 20, 2006Tim Bass
 
Big Data Security Analytic Solution using Splunk
Big Data Security Analytic Solution using SplunkBig Data Security Analytic Solution using Splunk
Big Data Security Analytic Solution using SplunkIJERA Editor
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1Asad Khan
 
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...Zhenzhong Xu
 
Msra 2011 windows7 forensics-troyla
Msra 2011 windows7 forensics-troylaMsra 2011 windows7 forensics-troyla
Msra 2011 windows7 forensics-troylaCTIN
 
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...Microsoft Tech Community
 
2014 Taverna tutorial myExperiment
2014 Taverna tutorial myExperiment2014 Taverna tutorial myExperiment
2014 Taverna tutorial myExperimentmyGrid team
 

Ähnlich wie Quick Reference Guide to Splunk Eventtypes (20)

SplunkLive! - Getting started with Splunk
SplunkLive! - Getting started with SplunkSplunkLive! - Getting started with Splunk
SplunkLive! - Getting started with Splunk
 
Splunk Components
Splunk ComponentsSplunk Components
Splunk Components
 
NATE-Central-Log
NATE-Central-LogNATE-Central-Log
NATE-Central-Log
 
Splunk .conf2011: Search Language: Intermediate
Splunk .conf2011: Search Language: IntermediateSplunk .conf2011: Search Language: Intermediate
Splunk .conf2011: Search Language: Intermediate
 
Getting started with Splunk - Break out Session
Getting started with Splunk - Break out SessionGetting started with Splunk - Break out Session
Getting started with Splunk - Break out Session
 
Getting started with Splunk
Getting started with SplunkGetting started with Splunk
Getting started with Splunk
 
Osdc Complex Event Processing
Osdc Complex Event ProcessingOsdc Complex Event Processing
Osdc Complex Event Processing
 
Mythbusters: Event Stream Processing v. Complex Event Processing
Mythbusters: Event Stream Processing v. Complex Event ProcessingMythbusters: Event Stream Processing v. Complex Event Processing
Mythbusters: Event Stream Processing v. Complex Event Processing
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk Enterprise
 
Apache UIMA Introduction
Apache UIMA IntroductionApache UIMA Introduction
Apache UIMA Introduction
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Proposed Event Processing Definitions ,September 20, 2006
Proposed Event Processing Definitions,September 20, 2006Proposed Event Processing Definitions,September 20, 2006
Proposed Event Processing Definitions ,September 20, 2006
 
Big Data Security Analytic Solution using Splunk
Big Data Security Analytic Solution using SplunkBig Data Security Analytic Solution using Splunk
Big Data Security Analytic Solution using Splunk
 
Splunk
SplunkSplunk
Splunk
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1
 
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
 
Msra 2011 windows7 forensics-troyla
Msra 2011 windows7 forensics-troylaMsra 2011 windows7 forensics-troyla
Msra 2011 windows7 forensics-troyla
 
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...Leveraging Azure Databricks to minimize time to insight by combining Batch an...
Leveraging Azure Databricks to minimize time to insight by combining Batch an...
 
2014 Taverna tutorial myExperiment
2014 Taverna tutorial myExperiment2014 Taverna tutorial myExperiment
2014 Taverna tutorial myExperiment
 

Mehr von Splunk

Vtex - SplunkLive! São Paulo 2015
Vtex - SplunkLive! São Paulo 2015Vtex - SplunkLive! São Paulo 2015
Vtex - SplunkLive! São Paulo 2015Splunk
 
Exxon - SplunkLive! São Paulo 2015
Exxon - SplunkLive! São Paulo 2015Exxon - SplunkLive! São Paulo 2015
Exxon - SplunkLive! São Paulo 2015Splunk
 
99 Taxi - SplunkLive! São Paulo 2015
99 Taxi - SplunkLive! São Paulo 201599 Taxi - SplunkLive! São Paulo 2015
99 Taxi - SplunkLive! São Paulo 2015Splunk
 
Vtex - Splunk live! 2014 São Paulo
Vtex - Splunk live! 2014 São Paulo Vtex - Splunk live! 2014 São Paulo
Vtex - Splunk live! 2014 São Paulo Splunk
 
Splunk live! São Paulo 2014 - Edenred-Ticket
Splunk live! São Paulo 2014 - Edenred-TicketSplunk live! São Paulo 2014 - Edenred-Ticket
Splunk live! São Paulo 2014 - Edenred-TicketSplunk
 
Splunk live! Inteligência operacional em um mundo de bigdata
Splunk live! Inteligência operacional em um mundo de bigdataSplunk live! Inteligência operacional em um mundo de bigdata
Splunk live! Inteligência operacional em um mundo de bigdataSplunk
 
Splunklive! Universo Online
Splunklive! Universo OnlineSplunklive! Universo Online
Splunklive! Universo OnlineSplunk
 
SplunkLive! São Paulo 2014 - Overview by markus zirn
SplunkLive! São Paulo 2014 -  Overview by markus zirnSplunkLive! São Paulo 2014 -  Overview by markus zirn
SplunkLive! São Paulo 2014 - Overview by markus zirnSplunk
 
Splunk live introdução
Splunk live introduçãoSplunk live introdução
Splunk live introduçãoSplunk
 
Splunk live produban
Splunk live produbanSplunk live produban
Splunk live produbanSplunk
 
Caso de Sucesso Vodafone e Splunk
Caso de Sucesso Vodafone e SplunkCaso de Sucesso Vodafone e Splunk
Caso de Sucesso Vodafone e SplunkSplunk
 
Deploying Splunk. Arquitetura e dimensionamento do Splunk
Deploying Splunk. Arquitetura e dimensionamento do SplunkDeploying Splunk. Arquitetura e dimensionamento do Splunk
Deploying Splunk. Arquitetura e dimensionamento do SplunkSplunk
 
Visibilidade de negócios em impressão de nota fiscal
Visibilidade de negócios em impressão de nota fiscalVisibilidade de negócios em impressão de nota fiscal
Visibilidade de negócios em impressão de nota fiscalSplunk
 
Clientes Splunk Brasil
Clientes Splunk BrasilClientes Splunk Brasil
Clientes Splunk BrasilSplunk
 
Introdução Splunk Brasil
Introdução Splunk BrasilIntrodução Splunk Brasil
Introdução Splunk BrasilSplunk
 
BVMF and Splunk
BVMF and SplunkBVMF and Splunk
BVMF and SplunkSplunk
 
Visão geral da splunk
Visão geral da splunkVisão geral da splunk
Visão geral da splunkSplunk
 
Guia para inteligência operacional
Guia para inteligência operacionalGuia para inteligência operacional
Guia para inteligência operacionalSplunk
 
Gerenciamento de aplicativos
Gerenciamento de aplicativosGerenciamento de aplicativos
Gerenciamento de aplicativosSplunk
 

Mehr von Splunk (19)

Vtex - SplunkLive! São Paulo 2015
Vtex - SplunkLive! São Paulo 2015Vtex - SplunkLive! São Paulo 2015
Vtex - SplunkLive! São Paulo 2015
 
Exxon - SplunkLive! São Paulo 2015
Exxon - SplunkLive! São Paulo 2015Exxon - SplunkLive! São Paulo 2015
Exxon - SplunkLive! São Paulo 2015
 
99 Taxi - SplunkLive! São Paulo 2015
99 Taxi - SplunkLive! São Paulo 201599 Taxi - SplunkLive! São Paulo 2015
99 Taxi - SplunkLive! São Paulo 2015
 
Vtex - Splunk live! 2014 São Paulo
Vtex - Splunk live! 2014 São Paulo Vtex - Splunk live! 2014 São Paulo
Vtex - Splunk live! 2014 São Paulo
 
Splunk live! São Paulo 2014 - Edenred-Ticket
Splunk live! São Paulo 2014 - Edenred-TicketSplunk live! São Paulo 2014 - Edenred-Ticket
Splunk live! São Paulo 2014 - Edenred-Ticket
 
Splunk live! Inteligência operacional em um mundo de bigdata
Splunk live! Inteligência operacional em um mundo de bigdataSplunk live! Inteligência operacional em um mundo de bigdata
Splunk live! Inteligência operacional em um mundo de bigdata
 
Splunklive! Universo Online
Splunklive! Universo OnlineSplunklive! Universo Online
Splunklive! Universo Online
 
SplunkLive! São Paulo 2014 - Overview by markus zirn
SplunkLive! São Paulo 2014 -  Overview by markus zirnSplunkLive! São Paulo 2014 -  Overview by markus zirn
SplunkLive! São Paulo 2014 - Overview by markus zirn
 
Splunk live introdução
Splunk live introduçãoSplunk live introdução
Splunk live introdução
 
Splunk live produban
Splunk live produbanSplunk live produban
Splunk live produban
 
Caso de Sucesso Vodafone e Splunk
Caso de Sucesso Vodafone e SplunkCaso de Sucesso Vodafone e Splunk
Caso de Sucesso Vodafone e Splunk
 
Deploying Splunk. Arquitetura e dimensionamento do Splunk
Deploying Splunk. Arquitetura e dimensionamento do SplunkDeploying Splunk. Arquitetura e dimensionamento do Splunk
Deploying Splunk. Arquitetura e dimensionamento do Splunk
 
Visibilidade de negócios em impressão de nota fiscal
Visibilidade de negócios em impressão de nota fiscalVisibilidade de negócios em impressão de nota fiscal
Visibilidade de negócios em impressão de nota fiscal
 
Clientes Splunk Brasil
Clientes Splunk BrasilClientes Splunk Brasil
Clientes Splunk Brasil
 
Introdução Splunk Brasil
Introdução Splunk BrasilIntrodução Splunk Brasil
Introdução Splunk Brasil
 
BVMF and Splunk
BVMF and SplunkBVMF and Splunk
BVMF and Splunk
 
Visão geral da splunk
Visão geral da splunkVisão geral da splunk
Visão geral da splunk
 
Guia para inteligência operacional
Guia para inteligência operacionalGuia para inteligência operacional
Guia para inteligência operacional
 
Gerenciamento de aplicativos
Gerenciamento de aplicativosGerenciamento de aplicativos
Gerenciamento de aplicativos
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Kürzlich hochgeladen (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Quick Reference Guide to Splunk Eventtypes

  • 1. Eventtypes Quick Reference Guide Eventtypes are cross-referenced searches that categorize events at search time. For example, if you have defined an eventtype called "problem" that has a search definition of "error OR warn OR fatal OR fail", any time you do a search where a result CONCEPTS contains error, warn, fatal, or fail, the event will have an eventtype field/value with eventtype=problem. So, for example, if you were searching for "login", the logins Overview that had problems would get annotated with eventtype=problem. Eventtypes are essentially dynamic tags that get attached to an event if it matches the search Index-time Processing: Splunk reads data from a source, such as a file or port, on definition of the eventtype. a host (e.g. "my machine"), classifies that source into a sourcetype (e.g., "syslog", "access_combined", "apache_error", ...), then extracts timestamps, breaks up the Reports/Dashboards source into individual events (e.g., log events, alerts, …), which can be a single-line or multiple lines, and writes each event into an index on disk, for later retrieval with Search results with formatting information (e.g., as a table or chart) are informally a search. referred to as reports, and multiple reports can be placed on a common page, called a dashboard. Search-time Processing: When a search starts, matching indexed events are retrieved from disk, fields (e.g., code=404, user=david,...) are extracted from the event's text, and the event is classified by matching against eventtype definitions Apps Go to splunkbase.com/apps to download apps (e.g., 'error', 'login', ...). The events returned from a search can then be Apps are collections of Splunk configurations, objects, and code, allowing you to powerfully transformed using Splunk's search language to generate reports that live build different environments that sit on top of Splunk. You can have one app for on dashboards. troubleshooting email servers, one app for web analysis, and so on. Events Permissions/Users/Roles An event is a single entry of data. In the context of log file, this is an event in a Web Saved Splunk objects, such as savedsearches, eventtypes, reports, and tags, activity log: enrich your data, making it easier to search and understand. These objects have permissions and can be kept private or shared with other users, via roles (e.g., 173.26.34.223 - - [01/Jul/2009:12:05:27 -0700] "GET / "admin", "power", "user"). A role is a set of capabilities that you can define, like trade/app?action=logout HTTP/1.1" 200 2953 whether or not someone is allowed to add data or edit a report. Splunk with a Free License does not support user authentication. More specifically, an event is a set of values associated with a timestamp. While many events are short and only take up a line or two, others can be long, such as a whole text document, a config file, or whole java stack trace. Splunk uses line- Transactions breaking rules to determine how it breaks these events up for display in the search A transaction is a set of events grouped into one event for easier analysis. For results. example, given that a customer shopping at an online store would generate web access events with each click that each share a SessionID, it could be convenient to Sources/Sourcetypes group all of his events together into one transaction. Grouped into one transaction event, it’s easier to generate statistics like how long shoppers shopped, how many A source is the name of the file, stream, or other input from which a particular event items they bought, which shoppers bought items and then returned them, etc. originates – for example, /var/log/messages or UDP:514. Sources are classified into sourcetypes, which can either be well known, such as access_combined (HTTP Web server logs), or can be created on the fly by Splunk when it sees a source with data Forwarder/Indexer and formatting it hasn’t seen before. Events with the same sourcetype can come A forwarder is a version of Splunk that allows you to send data to a central Splunk from different sources—events from the file /var/log/messages and from a syslog indexer or group of indexers. An indexer provides indexing capability for local and input on udp:514 can both have sourcetype=linux_syslog. remote data. Hosts A host is the name of the physical or virtual device where an event originates. Host provides an easy way to find all data originating from a given device. Indexes When you add data to Splunk, Splunk processes it, breaking the data into individual events, timestamps them, and then stores them in an index, so that it can be later searched and analyzed. By default, data you feed to Splunk is stored in the "main" index, but you can create and specify other indexes for Splunk to use for different data inputs. Fields Fields are searchable name/value pairings in event data. As Splunk processes events at index time and search time, it automatically extracts fields. At index time, Splunk extracts a small set of default fields for each event, including host, source, and sourcetype. At search time, Splunk extracts what can be a wide range of fields from the event data, including user-defined patterns as well as obvious field name/value pairs such as user_id=jdoe. Tags Tags are aliases to field values. For example, if there are two host names that refer to the same computer, you could give both of those host values the same tag (e.g., "hall9000"), and then if you search for that tag (e.g., "hal9000"), Splunk will return events involving both host name values.
  • 2. SEARCH LANGUAGE COMMON SEARCH COMMANDS A search is a series of commands and arguments, each chained together with "|" COMMAND DESCRIPTION (pipe) character that takes the output of one command and feeds it into the next command on the right. chart/ timechart Returns results in a tabular output for (time-series) charting. search-args | cmd1 cmd-args | cmd2 cmd-args | ... dedup Removes subsequent results that match a specified criterion. Search commands are used to take indexed data and filter unwanted information, extract more information, calculate values, transform, and statistically analyze. The search results retrieved from the index can be thought of as a dynamically created eval Calculates an expression. (See EVAL FUNCTIONS table.) table. Each search command redefines the shape of that table. Each indexed event is a row, with columns for each field value. Columns include basic information about the data as well as columns that are dynamically extracted at search-time. fields Removes fields from search results. At the head of each search is an implied search-the-index-for-events command, which can be used to search for keywords (e.g., error), boolean expressions (e.g., (error OR failure) NOT success), phrases (e.g., "database head/tail Returns the first/last N results. error"), wildcards (e.g., fail* will match fail, fails, failure, etc.), field values (e.g., code=404), inequality (e.g., code!=404 or code>200), a field having any value or no value (e.g., code=* or NOT code=*). For example, the search: lookup Adds field values from an external source. sourcetype="access_combined" error | top 10 uri rename Renames a specified field; wildcards can be used to specify multiple fields. will retrieve indexed access_combined events from disk that contain the term "error" (ANDs are implied between search terms), and then for those events, report the top 10 most common URI values. replace Replaces values of specified fields with a specified new value. Subsearches rex Specifies regular expression named groups to extract fields. A subsearch is an argument to a command that runs its own search, returning those results to the parent command as the argument value. Subsearches are contained in square brackets. For example, finding all syslog events from the user that had the search Filters results to those that match the search expression. last login error: sourcetype=syslog [search login error | return user] sort Sorts search results by the specified fields. Note that the subsearch returns one user value, because by default the "return" command just returns one value, but there are options for more (e.g., | return stats Provides statistics, grouped optionally by fields. 5 user). Relative Time Modifiers top/rare Displays the most/least common values of a field. Besides using the custom-time ranges in the user-interface, you can specify in your search the time ranges of retrieved events with the latest and earliest transaction Groups search results into transactions. search modifiers. The relative times are specified with a string of characters that indicate amount of time (integer and unit) and, optionally, a "snap to" time unit: [+|-]<time_integer><time_unit>@<snap_time_unit> Optimizing Searches For example: "error earliest=-1d@d latest=-1h@h" will retrieve events The key to fast searching is to limit the data that needs to be pulled off disk to an containing "error" that occurred from yesterday (snapped to midnight) to the absolute minimum, and then to filter that data as early as possible in the search so last hour (snapped to the hour). that processing is done on the minimum data necessary. Time Units: specified as second (s), minute(m), hour(h), day(d), week(w), Partition data into separate indexes, if you’ll rarely perform searches across multiple month(mon), quarter(q), year(y). "time_integer" defaults to 1 (e.g., "m" is the same as types of data. For example, put web data in one index, and firewall data in another. "1m"). Snapping: indicates the nearest or latest time to which your time amount rounds • Search as specifically as you can (e.g. fatal_error, not *error*) down. Snaps rounds down to the latest time not after the specified time. For example, if it is 11:59:00 and you "snap to" hours (@h), you will snap to 11:00 not • Limit the time range to only what’s needed (e.g., -1h not -1w) 12:00. You can "snap to" a specific day of the week: use @w0 for Sunday, @w1 for Monday, etc. • Filter out unneeded fields as soon as possible in the search. • Filter out results as soon as possible before calculations. • Community For report generating searches, use the Advanced Charting view, and not the Flashtimeline view, which calculates timelines. ask questions, find answers. • On Flashtimeline, turn off ‘Discover Fields’ when not needed. download apps, share yours. • Use summary indexes to pre-calculate commonly used values. splunkbase.com • Make sure your disk I/O is the fastest you have available.
  • 3. SEARCH EXAMPLES Filter Results Add Fields Filter results to only include those with … | eval velocity=distance/ … | search fail status=0 Set velocity to distance / time. "fail" in their raw text and status=0. time Remove duplicates of results with the Extract "from" and "to" fields using … | dedup host … | rex field=_raw "From: same host value. regular expressions. If a raw event contains "From: Susan To: David", then (?<from>.*) To: (?<to>.*)" Keep only search results whose "_raw" … | regex _raw="(?<!d)10. from=Susan and to=David. field contains IP addresses in the non- d{1,3}.d{1,3}.d{1,3} routable class A (10.0.0.0/8). (?!d)" Save the running total of "count" in a … | accum count as total_ field called "total_count". count Group Results For each event where 'count' exists, Cluster results together, sort by their … | cluster t=0.9 compute the difference between count "cluster_count" values, and then return showcount=true | sort … | delta count as countdiff and its previous value and store the the 20 largest clusters (in data size). limit=20 -cluster_count result in 'countdiff'. Group results that have the same "host" Filter Fields and "cookie", occur within 30 seconds … | transaction host cookie of each other, and do not have a pause Keep the "host" and "ip" fields, and maxspan=30s maxpause=5s … | fields + host, ip greater than 5 seconds between each display them in the order: "host", "ip". event into a transaction. Remove the "host" and "ip" fields. … | fields - host, ip Group results with the same IP address … | transaction clientip (clientip) and where the first result startswith="signon" Modify Fields contains "signon", and the last result endswith="purchase" contains "purchase". Rename the "_ip" field as "IPAddress". … | rename _ip as IPAddress Order Results Return the first 20 results. … | head 20 Change any host value that ends with … | replace *localhost with "localhost" to "mylocalhost". mylocalhost in host Reverse the order of a result set. … | reverse Multi-Valued Fields Sort results by "ip" value (in ascending Combine the multiple values of the order) and then by "url" value … | sort ip, -url … | nomv recipients recipients field into a single value (in descending order). Separate the values of the "recipients" Return the last 20 results … | makemv delim="," … | tail 20 field into multiple field values, (in reverse order). recipients | top recipients displaying the top recipients Reporting Create new results for each value of the … | mvexpand recipients … | anomalousvalue multivalue field "recipients" Return events with uncommon values. action=filter pthresh=0.02 For each result that is identical except … | fields EventCode, for that RecordNumber, combine them, Category, RecordNumber Return the maximum "delay" by "size", … | chart max(delay) by size setting RecordNumber to be a multi- | mvcombine delim="," where "size" is broken down into a bins=10 valued field with all the varying values. RecordNumber maximum of 10 equal sized buckets. … | eval to_count = Return max(delay) for each value of foo … | chart max(delay) over Find the number of recipient values mvcount(recipients) split by the value of bar. foo by bar Find the first email address in the … | eval recipient_first = … | chart max(delay) over recipient field mvindex(recipient,0) Return max(delay) for each value of foo. foo … | eval netorg_recipients Remove all outlying numerical values. … | outlier Find all recipient values that end in .net = mvfilter(match(recipient, or .org ".net$") OR match(recipient, Remove duplicates of results with the ".org$")) same "host" value and return the total … | stats dc(host) count of the remaining results. Find the combination of the values of … | eval newval = foo, "bar", and the values of baz mvappend(foo, "bar", baz) Return the average for each hour, of any … | stats avg(*lay) by date_ … | eval orgindex = unique field that ends with the string Find the index of the first recipient value hour mvfind(recipient, ".org$") "lay" (e.g., delay, xdelay, relay, etc). match ".org$" Calculate the average value of "CPU" … | timechart span=1m Lookup Tables each minute for each "host". avg(CPU) by host Lookup the value of each event's 'user' … | lookup usertogroup user Create a timechart of the count of from field in the lookup table usertogroup, … | timechart count by host output group "web" sources by "host" setting the event's 'group' field. Return the 20 most common values of Write the search results to the lookup … | top limit=20 url … | outputlookup users.csv the "url" field. file "users.csv". Return the least common values of the Read in the lookup file "users.csv" as … | rare url … | inputlookup users.csv "url" field. search results.
  • 4. The eval command calculates an expression and puts the resulting value into a field (e.g. "...| eval force = mass * acceleration"). EVAL FUNCTIONS The following table lists the functions eval understands, in addition to basic arithmetic operators (+ - * / %), string concatenation (e.g., '...| eval name = last . ", " . last'), boolean operations (AND OR NOT XOR < > <= >= != = == LIKE). FUNCTION DESCRIPTION EXAMPLES abs(X) Returns the absolute value of X. abs(number) Takes pairs of arguments X and Y, where X arguments are Boolean case(error == 404, "Not found", error == case(X,"Y",…) expressions that, when evaluated to TRUE, return the corresponding Y 500,"Internal Server Error", error == argument. 200, "OK") ceil(X) Ceiling of a number X. ceil(1.9) cidrmatch("X",Y) Identifies IP addresses that belong to a particular subnet. cidrmatch("123.132.32.0/25",ip) coalesce(X,…) Returns the first value that is not null. coalesce(null(), "Returned val", null()) Evaluates an expression X using double precision floating point exact(X) arithmetic. exact(3.14*num) exp(X) Returns eX. exp(3) floor(X) Returns the floor of a number X. floor(1.9) If X evaluates to TRUE, the result is the second argument Y. If X if(X,Y,Z) evaluates to FALSE, the result evaluates to the third argument Z. if(error==200, "OK", "Error") isbool(X) Returns TRUE if X is Boolean. isbool(field) isint(X) Returns TRUE if X is an integer. isint(field) isnotnull(X) Returns TRUE if X is not NULL. isnotnull(field) isnull(X) Returns TRUE if X is NULL. isnull(field) isnum(X) Returns TRUE if X is a number. isnum(field) isstr() Returns TRUE if X is a string. isstr(field) len(X) This function returns the character length of a string X. len(field) like(X,"Y") Returns TRUE if and only if X is like the SQLite pattern in Y. like(field, "foo%") ln(X) Returns its natural log. ln(bytes) Returns the log of the first argument X using the second argument Y as log(X,Y) the base. Y defaults to 10. log(number,2) lower(X) Returns the lowercase of X. lower(username) Returns X with the characters in Y trimmed from the left side. Y defaults ltrim(X,Y) to spaces and tabs. ltrim(" ZZZabcZZ ", " Z") match(X,Y) Returns if X matches the regex pattern Y. match(field, "^d{1,3}.d$") max(X,…) Returns the max. max(delay, mydelay) md5(X) Returns the MD5 hash of a string value X. md5(field) min(X,…) Returns the min. min(delay, mydelay) mvcount(X) Returns the number of values of X. mvcount(multifield) mvfilter(X) Filters a multi-valued field based on the Boolean expression X. mvfilter(match(email, "net$")) Returns a subset of the multivalued field X from start position (zero- mvindex(X,Y,Z) based) Y to Z (optional). mvindex( multifield, 2) Given a multi-valued field X and string delimiter Y, and joins the mvjoin(X,Y) individual values of X using Y. mvjoin(foo, ";") now() Returns the current time, represented in Unix time. now() null() This function takes no arguments and returns NULL. null() Given two arguments, fields X and Y, and returns the X if the arguments nullif(X,Y) are different; returns NULL, otherwise. nullif(fieldA, fieldB) pi() Returns the constant pi. pi() pow(X,Y) Returns X . Y pow(2,10) random() Returns a pseudo-random number ranging from 0 to 2147483647. random() relative_time Given epochtime time X and relative time specifier Y, returns the relative_time(now(),"-1d@d") (X,Y) epochtime value of Y applied to X. Returns date with the month and day numbers switched, so if the input was Returns a string formed by substituting string Z for every occurrence of replace(X,Y,Z) regex string Y in string X. 1/12/2009 the return value would be 12/1/2009: replace(date, "^(d{1,2})/ (d{1,2})/", "2/1/") Returns X rounded to the amount of decimal places specified by Y. The round(X,Y) default is to round to an integer. round(3.5) Returns X with the characters in Y trimmed from the right side. rtrim(X,Y) If Y is not specified, spaces and tabs are trimmed. rtrim(" ZZZZabcZZ ", " Z")
  • 5. EVAL FUNCTIONS (continued) FUNCTION DESCRIPTION EXAMPLES searchmatch(X) Returns true if the event matches the search string X. searchmatch("foo AND bar") split(X,"Y") Returns X as a multi-valued field, split be delimiter Y. split(foo, ";") sqrt(X) Returns the square root of X. sqrt(9) strftime(X,Y) Returns epochtime value X rendered using the format specified by Y. strftime(_time, "%H:%M") Given a time represented by a string X, returns value parsed from strptime(X,Y) format Y. strptime(timeStr, "%H:%M") Returns a substring field X from start position (1-based) Y for Z substr("string", 1, 3) substr(X,Y,Z) (optional) characters. +substr("string", -3) time() Returns the wall-clock time with microsecond resolution. time() Converts input string X to a number, where Y (optional, defaults to 10) tonumber(X,Y) defines the base of the number to convert to. tonumber("0A4",16) Returns a field value of X as a string. If the value of X is a number, it reformats it as a string; if a Boolean value, either "True" or "False". If X is This example returns: a number, the second argument Y is optional and can either be "hex" foo=615 and foo2=00:10:15: tostring(X,Y) (convert X to hexadecimal), "commas" (formats X with commas and … | eval foo=615 | eval foo2 = tostring(foo, 2 decimal places), or "duration" (converts seconds X to readable time "duration") format HH:MM:SS). Returns X with the characters in Y trimmed from both sides. trim(X,Y) If Y is not specified, spaces and tabs are trimmed. trim(" ZZZZabcZZ ", " Z") This example returns: "NumberStringBoolInvalid": typeof(X) Returns a string representation of its type. typeof(12)+ typeof("string")+ typeof(1==2)+ typeof(badfield) upper(X) Returns the uppercase of X. upper(username) urldecode("http%3A%2F%2Fwww.splunk. urldecode(X) Returns the URL X decoded. com%2Fdownload%3Fr%3Dheader") Given pairs of arguments, Boolean expressions X and strings Y, returns validate(isint(port), "ERROR: Port is not validate(X,Y,…) the string Y corresponding to the first expression X that evaluates to an integer", port >= 1 AND port <= 65535, False and defaults to NULL if all are True. "ERROR: Port is out of range") COMMON STATS FUNCTIONS Common statistical functions used with the chart, stats, and timechart commands. Field names can be wildcarded, so avg(*delay) might calculate the average of the delay and xdelay fields. FUNCTION DESCRIPTION avg(X) Returns the average of the values of field X. count(X) Returns the number of occurrences of the field X. To indicate a specific field value to match, format X as eval(field="value"). dc(X) Returns the count of distinct values of the field X. first(X) Returns the first seen value of the field X. In general, the first seen value of the field is the chronologically most recent instance of field. last(X) Returns the last seen value of the field X. list(X) Returns the list of all values of the field X as a multi-value entry. The order of the values reflects the order of input events. max(X) Returns the maximum value of the field X. If the values of X are non-numeric, the max is found from lexicographic ordering. median(X) Returns the middle-most value of the field X. min(X) Returns the minimum value of the field X. If the values of X are non-numeric, the min is found from lexicographic ordering. mode(X) Returns the most frequent value of the field X. perc<X>(Y) Returns the X-th percentile value of the field Y. For example, perc5(total) returns the 5th percentile value of a field "total". range(X) Returns the difference between the max and min values of the field X. stdev(X) Returns the sample standard deviation of the field X. stdevp(X) Returns the population standard deviation of the field X. sum(X) Returns the sum of the values of the field X. sumsq(X) Returns the sum of the squares of the values of the field X. values(X) Returns the list of all distinct values of the field X as a multi-value entry. The order of the values is lexicographical. var(X) Returns the sample variance of the field X.
  • 6. REGULAR EXPRESSIONS (REGEXES) Regular Expressions are useful in multiple areas: search commands regex and rex; eval functions match() and replace(); and in field extraction. REGEX NOTE EXAMPLE EXPLANATION s white space dsd digit space digit S not white space dSd digit non-whitespace digit d digit ddd-dd-dddd SSN D not digit DDD three non-digits w word character (letter, number, or _ ) www three word chars W not a word character WWW three non-word chars [...] any included character [a-z0-9#] any char that is a thru z, 0 thru 9, or # [^...] no included character [^xyx] any char but x, y, or z * zero or more w* zero or more words chars + one or more d+ integer ? zero or one ddd-?dd-?dddd SSN with dashes being optional | or w|d word or digit character (?P<var> ...) named extraction (?P<ssn>ddd-dd-dddd) pull out a SSN and assign to 'ssn' field (?: ... ) logical grouping (?:w|d)|(?:d|w) word-char then digit OR digit then word-char ^ start of line ^d+ line begins with at least one digit $ end of line d+$ line ends with at least one digit {...} number of repetitions d{3,5} between 3-5 digits escape [ escape the [ char (?= ...) lookahead (?=D)error "error" must be preceded by a non-digit (?! ...) negative lookahead (?!d)error "error" cannot be preceded by a digit COMMON SPLUNK STRPTIME FORMATS strptime formats are useful for eval functions strftime() and strptime(), and for timestamping of event data. %H 24 hour (leading zeros) (00 to 23) %I 12 hour (leading zeros) (01 to 12) %M Minute (00 to 59) %S Second (00 to 61) Time subseconds with width (%3N = millisecs, %N %6N = microsecs, %9N = nanosecs) %p AM or PM %Z Time zone (GMT) %s Seconds since 1/1/1970 (1308677092) %d Day of month (leading zeros) (01 to 31) %j Day of year (001 to 366) Days %w Weekday (0 to 6) %a Abbreviated weekday (Sun) %A Weekday (Sunday) %b Abbreviated month name (Jan) Months %B Month name (January) Splunk Inc. %m Month number (01 to 12) 250 Brannan Street %y Year without century (00 to 99) San Francisco, CA 94107 Years %Y Year (2008) %Y-%m-%d 1998-12-31 www.splunk.com %y-%m-%d 98-12-31 Examples %b %d, %Y Jan 24, 2003 %B %d, %Y January 24, 2003 Copyright © 2011 Splunk Inc. All rights reserved. q|%d %b '%y = %Y-%m-%d| q|25 Feb '03 = 2003-02-25|