43
LINUX.CONF.AU 21-25 January 2019 | Christchurch | NZ The Linux of Things #LCA2019 @linuxconfau Awesome Monitoring Infrastructure Using the Elastic Stack LINUX.CONF.AU 21-25 January 2019 Christchurch, NZ The Linux of Things | #LCA2019 | @linuxconfau Mark Walkom @warkolm Karen Carcamo @karencfv www.elastic.co

Awesome Monitoring Infrastructure Using the Elastic Stack

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Awesome Monitoring Infrastructure Using the Elastic Stack

LINUX.CONF.AU21-25 January 2019 | Christchurch | NZ

The Linux of Things#LCA2019@linuxconfau

Awesome MonitoringInfrastructure Using the

Elastic Stack

LINUX.CONF.AU21-25 January 2019 Christchurch, NZ

The Linux of Things | #LCA2019 | @linuxconfau

Mark Walkom @warkolmKaren Carcamo @karencfv

www.elastic.co

Page 2: Awesome Monitoring Infrastructure Using the Elastic Stack

LINUX.CONF.AU21-25 January 2019 | Christchurch | NZ

The Linux of Things#LCA2019@linuxconfau

LINUX.CONF.AU21-25 January 2019 Christchurch, NZ

The Linux of Things | #LCA2019 | @linuxconfau

Please install Docker :)

docker pull docker.elastic.co/elasticsearch/elasticsearch:6.5.4docker.elastic.co/elasticsearch/elasticsearch:6.5.4-oss

docker pull docker.elastic.co/kibana/kibana:6.5.4docker pull docker.elastic.co/kibana/kibana:6.5.4-oss

Commands at https://go.es.io/2MjxC9MSlides at https://go.es.io/2FN9ufo

Page 3: Awesome Monitoring Infrastructure Using the Elastic Stack

3

Us!

Page 4: Awesome Monitoring Infrastructure Using the Elastic Stack

4

Page 5: Awesome Monitoring Infrastructure Using the Elastic Stack

55

https://github.com/markwalkom/bloomsky-on-elastic

Page 6: Awesome Monitoring Infrastructure Using the Elastic Stack

6

Elastic Stack Elasticsearch, Kibana, Beats, and Logstash

Page 7: Awesome Monitoring Infrastructure Using the Elastic Stack

Store, Search, & Analyze

Visualize & Manage

Ingest

Elastic Stack

Kibana

Elasticsearch

Beats Logstash

Elastic Stack

Page 8: Awesome Monitoring Infrastructure Using the Elastic Stack

● Scalable

● Real-time

● Highly available

● Developer-friendly

● Versatile storage

● Query & aggregations

ElasticsearchHeart of the Elastic Stack

Page 9: Awesome Monitoring Infrastructure Using the Elastic Stack

MACHINE LEARNING

GRAPH

TEMPORAL

QUERY

GEOSPATIAL

AGGREGATION

Page 10: Awesome Monitoring Infrastructure Using the Elastic Stack

● Visualize and explore

● Manage and monitor

● Share and report

● Developer tools

● Time-series analysis

● Geospatial exploration

KibanaWindow into the Elastic Stack

Page 11: Awesome Monitoring Infrastructure Using the Elastic Stack

11

All the visualizations you expect, and then some more

Page 12: Awesome Monitoring Infrastructure Using the Elastic Stack

12

OOTB dashboards for 50+ (and growing) data sources

Page 13: Awesome Monitoring Infrastructure Using the Elastic Stack

● Ship from any source

● Transform at the edge

● Docker and k8s ready

● Cloud metadata enrichment

● 70+ community Beats

● 50+ modules

BeatsLightweight data shippers

Page 14: Awesome Monitoring Infrastructure Using the Elastic Stack

FILEBEATLog Files

METRICBEATMetrics

PACKETBEATNetwork Data

WINLOGBEATWindow Events

HEARTBEATUptime Monitoring

AUDITBEATAudit Data

FUNCTIONBEATServerless Monitoring

Plus a growing set of community Beats

Page 15: Awesome Monitoring Infrastructure Using the Elastic Stack

● Flexible ETL engine

● Parse & transform data

● Many inputs & outputs

● Horizontally scalable

● 200+ pluginsLogstash

Data processing pipeline

Page 16: Awesome Monitoring Infrastructure Using the Elastic Stack

ModulesData to dashboards in 5 minutes

Turnkey for many formatsAutomated data parsing Out of the box dashboardsPreconfigured ML jobs

Page 17: Awesome Monitoring Infrastructure Using the Elastic Stack

17

Let’s get started

Page 18: Awesome Monitoring Infrastructure Using the Elastic Stack

18

Let’s Install Elasticsearch

docker pull docker.elastic.co/elasticsearch/elasticsearch:6.5.4

Or

docker pull docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4

• https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docker.html

• https://www.docker.elastic.co/

• https://hub.docker.com/_/elasticsearch

Page 19: Awesome Monitoring Infrastructure Using the Elastic Stack

19

Let’s Run Elasticsearch

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.5.4

Or

docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.5.4

• https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docker.html

Page 20: Awesome Monitoring Infrastructure Using the Elastic Stack

20

version: '2.2'services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4 volumes: - esdata:/usr/share/elasticsearch/data ports: - 9200:9200

volumes: esdata: driver: local

Let’s docker-compose Elasticsearch

Page 21: Awesome Monitoring Infrastructure Using the Elastic Stack

21

Let’s (just) Elasticsearch

curl 0:9200/_cat/

curl 0:9200/_cat/health

curl 0:9200/_cat/indices?v

• https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat.html

Page 22: Awesome Monitoring Infrastructure Using the Elastic Stack

22

docker pull docker.elastic.co/kibana/kibana:6.5.4

Or

docker pull docker.elastic.co/kibana/kibana-oss:6.5.4

• https://www.elastic.co/guide/en/kibana/6.5/docker.html

• https://www.docker.elastic.co/

• https://hub.docker.com/_/kibana

Kibana Install

Page 23: Awesome Monitoring Infrastructure Using the Elastic Stack

23

docker run docker.elastic.co/kibana/kibana:6.5.4 -p 5601:5601 -e "elasticsearch.url=localhost:9200"

• (wait for it)• Open http://localhost:5601/

Kibana Run

Page 24: Awesome Monitoring Infrastructure Using the Elastic Stack

24

kibana: image: docker.elastic.co/kibana/kibana:6.5.4 links: - elasticsearch ports: - 5601:5601

• Use the complete Docker compose file in the gist

Let’s docker-compose Kibana

Page 25: Awesome Monitoring Infrastructure Using the Elastic Stack

25

• Just run that command• Alternatively;

docker-compose up -d

docker-compose up

Page 26: Awesome Monitoring Infrastructure Using the Elastic Stack

2626

Page 27: Awesome Monitoring Infrastructure Using the Elastic Stack

2727

Metricbeat

https://www.elastic.co/guide/en/beats/metricbeat/current/index.html

Page 28: Awesome Monitoring Infrastructure Using the Elastic Stack

28

• Download the binary• Extract

./metricbeat

• STOP!

./metricbeat setup --help

./metricbeat modules --help

Metricbeat Install and Run

Page 29: Awesome Monitoring Infrastructure Using the Elastic Stack

29

./metricbeat modules list

./metricbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

./metricbeat setup --dashboards

./metricbeat

• Enable the system module• See also https://go.es.io/2T44qWN

Metricbeat Install and Run

Page 30: Awesome Monitoring Infrastructure Using the Elastic Stack

3030

Filebeat

https://www.elastic.co/guide/en/beats/filebeat/current/index.html

Page 31: Awesome Monitoring Infrastructure Using the Elastic Stack

31

• Download the binary• Extract

./filebeat

• Remember

./filebeat setup --help

./filebeat modules --help

Filebeat Install and Run

Page 32: Awesome Monitoring Infrastructure Using the Elastic Stack

32

./filebeat modules list

./filebeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

./filebeat setup --dashboards

./filebeat

• Enable the system module• See also https://go.es.io/2T44qWN

Filebeat Install and Run

Page 33: Awesome Monitoring Infrastructure Using the Elastic Stack

3333

Let’s kick it up a notch

Page 34: Awesome Monitoring Infrastructure Using the Elastic Stack

3434

Metricbeat - Enable the docker module

Filebeat - Enable the docker input

Page 35: Awesome Monitoring Infrastructure Using the Elastic Stack

3535

Let’s analyse Elasticsearch traffic!

Page 36: Awesome Monitoring Infrastructure Using the Elastic Stack

3636

Packetbeat

https://www.elastic.co/guide/en/beats/packetbeat/current/index.html

Page 37: Awesome Monitoring Infrastructure Using the Elastic Stack

37

• Download the binary• Extract

./packetbeat

• Remember

./packetbeat setup --help

./packetbeat modules --help

Packetbeat Install and Run

Page 38: Awesome Monitoring Infrastructure Using the Elastic Stack

38

./packetbeat modules list

./packetbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

./packetbeat setup --dashboards

./packetbeat

• See also https://go.es.io/2T44qWN

Metricbeat Install and Run

Page 39: Awesome Monitoring Infrastructure Using the Elastic Stack

3939

Heartbeat

https://www.elastic.co/guide/en/beats/heartbeat/current/index.html

Page 40: Awesome Monitoring Infrastructure Using the Elastic Stack

40

• Download the binary• Extract

./heartbeat

• Remember

./heartbeat setup --help

./heartbeat modules --help

Heartbeat Install and Run

Page 41: Awesome Monitoring Infrastructure Using the Elastic Stack

41

./heartbeat modules list

./heartbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

./heartbeat setup --dashboards

./heartbeat

• See also https://go.es.io/2T44qWN

Heartbeat Install and Run

Page 42: Awesome Monitoring Infrastructure Using the Elastic Stack

4242

Community beatsLogstash!Elasticsearch Ingest[Heart|Winlog|DIY]beatAPMDashboards

Page 43: Awesome Monitoring Infrastructure Using the Elastic Stack

LINUX.CONF.AU21-25 January 2019 | Christchurch | NZ

The Linux of Things#LCA2019@linuxconfau

Whakawhetai Koe!

LINUX.CONF.AU21-25 January 2019 Christchurch, NZ

The Linux of Things | #LCA2019 | @linuxconfau