2019-06-13 11:14:40 +02:00
[role="xpack"]
[[xpack-logs-using]]
2019-08-28 17:52:39 +02:00
== Using the Logs app
Use the Logs app in {kib} to explore and filter your logs in real time.
2019-06-13 11:14:40 +02:00
2019-08-28 17:52:39 +02:00
You can customize the output to focus on the data you want to see and to control how you see it.
You can also view related application traces or uptime information where available.
2019-06-13 11:14:40 +02:00
[role="screenshot"]
2019-08-28 17:52:39 +02:00
image::logs/images/logs-console.png[Logs Console in Kibana]
2019-06-13 11:14:40 +02:00
[float]
[[logs-search]]
2019-08-28 17:52:39 +02:00
=== Use the power of search
2019-06-13 11:14:40 +02:00
2019-08-28 17:52:39 +02:00
Use the search bar to perform ad hoc searches for specific text.
You can also create structured queries using {kibana-ref}/kuery-query.html[Kibana Query Language].
For example, enter `host.hostname : "host1"` to see only the information for `host1`.
2019-10-29 12:29:21 +01:00
// ++ this isn't quite the same as the corresponding metrics description now.
2019-06-13 11:14:40 +02:00
[float]
[[logs-configure-source]]
2019-08-28 17:52:39 +02:00
=== Configure the data to use for your logs
Are you using a custom index pattern to store the log entries?
Do you want to limit the entries shown or change the fields displayed in the columns?
If so, <<xpack-logs-configuring, configure the logs source data>> to change the index pattern and other settings.
2019-06-13 11:14:40 +02:00
[float]
[[logs-time]]
2019-08-28 17:52:39 +02:00
=== Specify the time and date
2019-06-13 11:14:40 +02:00
2019-10-07 22:21:40 +02:00
Click image:images/time-filter-calendar.png[time filter calendar], then choose the time range for the logs.
2020-03-09 16:29:25 +01:00
Log entries for the specified time appear in the middle of the page. To quickly jump to a nearby point in time, click the minimap timeline to the right.
2019-08-28 17:52:39 +02:00
// ++ what's this thing called? It's minimap in the UI. Would timeline be better?
2019-06-13 11:14:40 +02:00
[float]
[[logs-customize]]
=== Customize your view
2019-08-28 17:52:39 +02:00
Click *Customize* to customize the view.
2020-04-01 11:55:00 +02:00
Here, you can choose whether to wrap long lines, and choose your preferred text size.
2019-06-13 11:14:40 +02:00
2019-10-15 15:05:42 +02:00
[float]
=== Configuring the data to use for your logs
If your logs have custom index patterns, use non-default field settings, or contain parsed fields which you want to expose as individual columns, you can <<xpack-logs-configuring, override the default configuration settings>>.
2019-06-13 11:14:40 +02:00
[float]
[[logs-stream]]
=== Stream or pause logs
2019-08-28 17:52:39 +02:00
Click *Stream live* to start streaming live log data, or click *Stop streaming* to focus on historical data.
2019-06-13 11:14:40 +02:00
2019-08-28 17:52:39 +02:00
When you are viewing historical data, you can scroll back through the entries as far as there is data available.
2019-06-13 11:14:40 +02:00
2019-08-28 17:52:39 +02:00
When you are streaming live data, the most recent log appears at the bottom of the page.
In live streaming mode, you are not able to choose a different time in the time selector or use the minimap timeline.
To do either of these things, you need to stop live streaming first.
// ++ Not sure whether this is correct or not. And what about just scrolling through the display?
// ++ There may be a bug here, (I managed to get future logs) see https://github.com/elastic/kibana/issues/43361
2019-06-21 17:07:45 +02:00
2019-07-22 16:50:41 +02:00
[float]
[[logs-highlight]]
=== Highlight a phrase in the logs stream
2019-08-28 17:52:39 +02:00
To highlight a word or phrase in the logs stream, click *Highlights* and enter your search phrase.
// ++ Is search case sensitive?
// ++ Can you search for multiple phrases together, if so, what's the separator?
// ++ What about special characters? For example, I notice that when searching for "Mozilla/4.0" which appears as written in my logs, "Mozilla" is highlighted, as is "4.0" but "/" isn't. The string "-" (which appears in the logs as written, quotes and all, isn't found at all. Any significance?
2019-07-22 16:50:41 +02:00
2019-06-21 17:07:45 +02:00
[float]
[[logs-event-inspector]]
=== Inspect a log event
2019-08-28 17:52:39 +02:00
To inspect a log event, hover over it, then click the *View details* icon image:logs/images/logs-view-event.png[View event icon] beside the event.
This opens the *Log event document details* fly-out that shows the fields associated with the log event.
2019-06-21 17:07:45 +02:00
2019-10-15 15:05:42 +02:00
To quickly filter the logs stream by one of the field values, in the log event details, click the *View event with filter* icon image:logs/images/logs-view-event-with-filter.png[View event icon] beside the field.
2019-08-28 17:52:39 +02:00
This automatically adds a search filter to the logs stream to filter the entries by this field and value.
2019-06-21 17:07:45 +02:00
2019-11-21 18:34:51 +01:00
[float]
[[view-log-anomalies]]
=== View log anomalies
When the machine learning anomaly detection features are enabled, click *Log rate*, which allows you to
<<xpack-logs-analysis,use machine learning to detect and inspect anomalies>> in your log data.
[float]
[[logs-integrations]]
=== Logs app integrations
To see other actions related to the event, click *Actions* in the log event details.
Depending on the event and the features you have configured, you may also be able to:
2019-06-21 17:07:45 +02:00
2019-09-04 17:38:15 +02:00
* Select *View status in Uptime* to <<uptime-overview, view related uptime information>> in the *Uptime* app.
2019-08-28 17:52:39 +02:00
* Select *View in APM* to <<traces, view related APM traces>> in the *APM* app.