Docs: Fix asciidoctor compatibility (#43473)
This modifies the asciidoc files so they can be built by asciidoctor. The biggest change is removing callouts that aren't at the end of the line. To do that I break the examples from one giant line into many shorter lines.
This commit is contained in:
parent
7185d5004a
commit
2778539171
|
@ -13,7 +13,6 @@ light to dark.
|
|||
[role="screenshot"]
|
||||
image::maps/images/sample_data_web_logs.png[]
|
||||
|
||||
[float]
|
||||
[[maps-read-only-access]]
|
||||
NOTE: If you have insufficient privileges to create or save maps, a read-only icon
|
||||
appears in the application header. The buttons to create new maps or edit
|
||||
|
|
|
@ -47,7 +47,13 @@ To compare the two data sets, add another series with data from the previous hou
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct'), .es(offset=-1h,index=metricbeat-*, timefield='@timestamp', <1> metric='avg:system.cpu.user.pct')
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct'),
|
||||
.es(offset=-1h, <1>
|
||||
index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
----------------------------------
|
||||
|
||||
<1> `offset` offsets the data retrieval by a date expression. In this example, `-1h` offsets the data back by one hour.
|
||||
|
@ -81,7 +87,16 @@ Add a meaningful title:
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour'), .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour').title('CPU usage over time') <1>
|
||||
.es(offset=-1h,
|
||||
index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('last hour'),
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('current hour')
|
||||
.title('CPU usage over time') <1>
|
||||
----------------------------------
|
||||
|
||||
<1> `.title()` adds a title with a meaningful name. Titles make is easier for unfamiliar users to understand the purpose of the visualization.
|
||||
|
@ -98,7 +113,17 @@ To differentiate between the current hour data and the last hour data, change th
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour').lines(fill=1,width=0.5), <1> .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour').title('CPU usage over time')
|
||||
.es(offset=-1h,
|
||||
index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('last hour')
|
||||
.lines(fill=1,width=0.5), <1>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('current hour')
|
||||
.title('CPU usage over time')
|
||||
----------------------------------
|
||||
|
||||
<1> `.lines()` changes the appearance of the chart lines. In this example, `.lines(fill=1,width=0.5)` sets the fill level to `1`, and the border width to `0.5`.
|
||||
|
@ -115,7 +140,19 @@ To make the current hour data stand out, change the line colors:
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour').lines(fill=1,width=0.5).color(gray), <1> .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour').title('CPU usage over time').color(#1E90FF)
|
||||
.es(offset=-1h,
|
||||
index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('last hour')
|
||||
.lines(fill=1,width=0.5)
|
||||
.color(gray), <1>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='avg:system.cpu.user.pct')
|
||||
.label('current hour')
|
||||
.title('CPU usage over time')
|
||||
.color(#1E90FF)
|
||||
----------------------------------
|
||||
|
||||
<1> `.color()` changes the color of the data. Supported color types include standard color names, hexadecimal values, or a color schema for grouped data. In this example, `.color(gray)` represents the last hour, and `.color(#1E90FF)` represents the current hour.
|
||||
|
@ -217,7 +254,25 @@ Customize and format the visualization using functions:
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(index=metricbeat*, timefield=@timestamp, metric=max:system.network.in.bytes).derivative().divide(1048576).lines(fill=2, width=1).color(green).label("Inbound traffic").title("Network traffic (MB/s)"), .es(index=metricbeat*, timefield=@timestamp, <1> <2> metric=max:system.network.out.bytes).derivative().multiply(-1).divide(1048576).lines(fill=2, width=1).color(blue)<.label("Outbound <3> <4> traffic").legend(columns=2, position=nw) <5>
|
||||
.es(index=metricbeat*,
|
||||
timefield=@timestamp,
|
||||
metric=max:system.network.in.byte)
|
||||
.derivative()
|
||||
.divide(1048576)
|
||||
.lines(fill=2, width=1)
|
||||
.color(green)
|
||||
.label("Inbound traffic") <1>
|
||||
.title("Network traffic (MB/s)"), <2>
|
||||
.es(index=metricbeat*,
|
||||
timefield=@timestamp,
|
||||
metric=max:system.network.out.bytes)
|
||||
.derivative()
|
||||
.multiply(-1)
|
||||
.divide(1048576)
|
||||
.lines(fill=2, width=1) <3>
|
||||
.color(blue) < <4>
|
||||
.label("Outbound traffic")
|
||||
.legend(columns=2, position=nw) <5>
|
||||
----------------------------------
|
||||
|
||||
<1> `.label()` adds custom labels to the visualization.
|
||||
|
@ -269,7 +324,31 @@ To track the amount of memory used, create two thresholds:
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes'), .es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes').if(gt,11300000000,.es(index=metricbeat-*, timefield='@timestamp', <1> <2> metric='max:system.memory.actual.used.bytes'),null).label('warning').color('#FFCC11'), .es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes').if(gt,11375000000,.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes'),null).label('severe').color('red')
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes'),
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.if(gt, <1>
|
||||
11300000000, <2>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes'),
|
||||
null)
|
||||
.label('warning')
|
||||
.color('#FFCC11'),
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.if(gt,
|
||||
11375000000,
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes'),
|
||||
null)
|
||||
.label('severe')
|
||||
.color('red')
|
||||
----------------------------------
|
||||
|
||||
<1> Timelion conditional logic for the _greater than_ operator. In this example, the warning threshold is 11.3GB (`11300000000`), and the severe threshold is 11.375GB (`11375000000`). If the threshold values are too high or low for your machine, adjust the values accordingly.
|
||||
|
@ -304,7 +383,43 @@ Customize and format the visualization using functions:
|
|||
|
||||
[source,text]
|
||||
----------------------------------
|
||||
.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes').label('max memory').title('Memory consumption over time') <1> <2>, .es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes').if(gt,11300000000,.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes'),null).label('warning').color('#FFCC11').lines(width=5), .es(index=metricbeat-*, timefield='@timestamp', <3> <4> metric='max:system.memory.actual.used.bytes').if(gt,11375000000,.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes'),null).label('severe').color('red').lines(width=5), .es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes').mvavg(10).label('mvavg').lines(width=2).color(#5E5E5E).legend(columns=4, position=nw) <5>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.label('max memory') <1>
|
||||
.title('Memory consumption over time'), <2>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.if(gt,
|
||||
11300000000,
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes'),
|
||||
null)
|
||||
.label('warning')
|
||||
.color('#FFCC11') <3>
|
||||
.lines(width=5), <4>
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.if(gt,
|
||||
11375000000,
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes'),
|
||||
null)
|
||||
.label('severe')
|
||||
.color('red')
|
||||
.lines(width=5),
|
||||
.es(index=metricbeat-*,
|
||||
timefield='@timestamp',
|
||||
metric='max:system.memory.actual.used.bytes')
|
||||
.mvavg(10)
|
||||
.label('mvavg')
|
||||
.lines(width=2)
|
||||
.color(#5E5E5E)
|
||||
.legend(columns=4, position=nw) <5>
|
||||
----------------------------------
|
||||
|
||||
<1> `.label()` adds custom labels to the visualization.
|
||||
|
|
Loading…
Reference in a new issue