codeaprendiz.github.io

DevOps Essentials

View on GitHub

System - Monitoring

Stats Visualization
Number of hosts
CPU Usage Guage
Memory Usage Gauge
Disk used
Inbound Traffic
Outbound Traffic
Top Hosts By CPU Realtime
Top Hosts By Memory Realtime
Host histogram by CPU usage

Number-of-hosts

Metrics

## UniqueCount ##
a = UniqueCount(host.name)

CPU-Usage-Gauge

Aggregations

## Average ##
user = Avg(system.cpu.user.pct)

## Average ##
system = Avg(system.cpu.system.pct)

## Average ##
n = Avg(system.cpu.cores)

## Bucket Script ##
params.n > 0 ? (params.user+params.system)/params.n : null

GroupBy-Everything
COLOR EXPRESSION VALUE
GREEN : >= greater than or equal 0
ORANGE : >= greater than or equal 0.7
RED : >= greater than or equal 0.85

Memory-Usage-Gauge

Aggregation

## Average ##
a = Avg(system.memory.actual.used.pct)

GroupBy-Everything
COLOR EXPRESSION VALUE
GREEN : >= greater than or equal 0
ORANGE : >= greater than or equal 0.7
RED : >= greater than or equal 0.85

Disk-used

Aggregation

## TopHit ##
a = TopHit(system.fsstat.total_size.used)         # Size=1, Aggregate with Avg, Order By : @timastamp, Desc

## TopHit ##
b = TopHit(system.fsstat.total_size.total)        # Size=1, Aggregate with Avg, Order By : @timastamp, Desc

Expression = a/b

GroupBy-Everything
COLOR EXPRESSION VALUE
GREEN : >= greater than or equal 0
ORANGE : >= greater than or equal 0.7
RED : >= greater than or equal 0.85

Inbound-Traffic

network network contains network IO metrics for a single network interface.

Aggregation

## Max ##
a = Max(system.network.in.bytes)

## Derivative ##
b = Derivative(a)/1s

## PositiveOnly ##
c = PositiveOnly(b)

## Series Agg ##
Function : Sum             # c1 + c2 + c3 ....

GroupBy-Terms : system.network.name
Top : 10
OrderBy : Doc Count (default)
Decending

Total Transferred

Aggregation

## Max ##
a = Max(system.network.in.bytes)

## Derivative ##
b = Derivative(a)/1s

## PositiveOnly ##
c = PositiveOnly(b)

## Series Agg ##
Function : Overall Sum             # c1 + c2 + c3 ....

GroupBy-Terms : system.network.name
Top : 10
OrderBy : Doc Count (default)
Decending

Outbound-Traffic

Aggregation

## Max ##
a = Max(system.network.out.bytes)

## Derivative ##
b = Derivative(a)/1s

## PositiveOnly ##
c = PositiveOnly(b)

## Series Agg ##
Function : Sum             # c1 + c2 + c3 ....

GroupBy-Terms : system.network.name
Top : 10
OrderBy : Doc Count (default)
Decending

Total Transferred

Aggregation

## Max ##
a = Max(system.network.out.bytes)

## Derivative ##
b = Derivative(a)/1s

## PositiveOnly ##
c = PositiveOnly(b)

## Series Agg ##
Function : Overall Sum             # c1 + c2 + c3 ....

GroupBy-Terms : system.network.name
Top : 10
OrderBy : Doc Count (default)
Decending

Top-Hosts-By-CPU-Realtime

Aggregation

## Average ##
a = Avg(system.cpu.user.pct)

GroupBy-Terms : host.name
Top : 10
Order by : a
Desc
COLOR EXPRESSION VALUE
GREEN : >= greater than or equal 0
ORANGE : >= greater than or equal 0.6
RED : >= greater than or equal 0.85

Top-Hosts-By-Memory-Realtime

Aggregation

## Average ##
a = Avg(system.memory.actual.used.pct)

GroupBy-Terms : host.name
Top : 10
Order by : a
Desc
COLOR EXPRESSION VALUE
GREEN : >= greater than or equal 0
ORANGE : >= greater than or equal 0.6
RED : >= greater than or equal 0.85

Hosts-histogram-by-CPU-usage

Metrics

Value Average(system.cpu.user.pct)

Buckets

## X-axis ##
@timestamp per 30 seconds

## Y-axis ##
host.name: Descending