Events User Manual - Parse Command: Difference between revisions
(Created page with "=Internal= * events User Manual") |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* [[events User Manual#Commands|events User Manual]] | * [[events User Manual#Commands|events User Manual]] | ||
=Overview= | |||
The command configures an events pipeline to process text data arriving at stdout and convert it into a time series at stdout, according to the specified format. | |||
=Syntax= | |||
<pre> | |||
events < input-file <input-format-specification> | |||
</pre> | |||
=Input Format Specification= | |||
The format of the input stream can be specified either verbatim, in-line in the command line or in a file whose name is specified on the command line, or by a name. | |||
==In-Line Input Formats== | |||
To specify a verbatim format in line, use: | |||
<pre> | |||
-i format-specification | |||
</pre> | |||
or | |||
<pre> | |||
--input-format=format-specification | |||
</pre> | |||
If the format specification is stored in a file on an accessible filesystem, it can be specified as follows: | |||
<pre> | |||
--input-format-file=<file-name-that-contains-input-format> | |||
</pre> | |||
Formats that can be specified in-line usually apply to line-based logs, such as Apache httpd logs, or CSV files. A httpd log format can be specified in-line, introduced by the -i short option -i (or with the long form equivalent --input-format="...") as follows: | |||
<pre> | |||
-i "%h %u [%t] \"%r\" \"%q\" %{c,JSESSIONID} %{i,Some-Request-Header} %s %b %D" | |||
</pre> | |||
More details about the httpd log format support can be found in the "[[events User Manual - Apache httpd Logs#Input_Format|Apache httpd log format]]" section. A CSV file format can be specified in-line as follows: | |||
<pre> | |||
-i "timestamp, count, status-code" | |||
</pre> | |||
More details about the CSV format support can be found in the "[[Events_User_Manual_-_CSV_Support#Input_Format#Input_Format|CSV format]]" section. | |||
When an in-line format is used, the runtime will apply heuristics and try to figure out what type of format was specified. | |||
==Named Formats== | |||
A format specified by its logical name can be provided as follows: | |||
<pre> | |||
-i format-name | |||
</pre> | |||
or | |||
<pre> | |||
--input-format=format-name | |||
</pre> | |||
=Supported Formats= | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[events User Manual - Apache httpd Logs#Input_Format|Apache httpd log format]] | |||
:[[events User Manual - CSV Support#Input_Format|CSV format]] | |||
:[[events User Manual - Java Garbage Collection Logs#G1|G1 Garbage Collection Log]] | |||
</blockquote> |
Latest revision as of 23:15, 14 February 2017
Internal
Overview
The command configures an events pipeline to process text data arriving at stdout and convert it into a time series at stdout, according to the specified format.
Syntax
events < input-file <input-format-specification>
Input Format Specification
The format of the input stream can be specified either verbatim, in-line in the command line or in a file whose name is specified on the command line, or by a name.
In-Line Input Formats
To specify a verbatim format in line, use:
-i format-specification
or
--input-format=format-specification
If the format specification is stored in a file on an accessible filesystem, it can be specified as follows:
--input-format-file=<file-name-that-contains-input-format>
Formats that can be specified in-line usually apply to line-based logs, such as Apache httpd logs, or CSV files. A httpd log format can be specified in-line, introduced by the -i short option -i (or with the long form equivalent --input-format="...") as follows:
-i "%h %u [%t] \"%r\" \"%q\" %{c,JSESSIONID} %{i,Some-Request-Header} %s %b %D"
More details about the httpd log format support can be found in the "Apache httpd log format" section. A CSV file format can be specified in-line as follows:
-i "timestamp, count, status-code"
More details about the CSV format support can be found in the "CSV format" section.
When an in-line format is used, the runtime will apply heuristics and try to figure out what type of format was specified.
Named Formats
A format specified by its logical name can be provided as follows:
-i format-name
or
--input-format=format-name