Top Banner
Cloud Foundry Logging and Metrics CF Summit 2015
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cloud Foundry Logging and Metrics

Cloud FoundryLogging and Metrics

CF Summit 2015

Page 2: Cloud Foundry Logging and Metrics

About UsCloudCredo

Page 3: Cloud Foundry Logging and Metrics

The Problem

Page 4: Cloud Foundry Logging and Metrics

Component OverviewLoggregator and the Firehose

Page 5: Cloud Foundry Logging and Metrics

Loggregator

● Sources, metron, doppler and traffic controller● Provides `cf logs my-app` functionality● Allows forwarding to 3rd party syslog drains● doppler stores data in temporary buffers● NB: Does not provide long-term storage● The traffic controller handles client requests

Page 6: Cloud Foundry Logging and Metrics

Source: http://github.com/cloudfoundry/loggregator

Page 7: Cloud Foundry Logging and Metrics

The Firehose

● The firehose is a relatively new feature● It’s a stream of every app’s logs, plus metrics

data from Cloud Foundry’s components● The traffic controllers expose the /firehose

websocket endpoint● nozzles attach to the firehose, parse out relevant

data and forward it to other 3rd parties (e.g. syslog and Graphite)

Page 8: Cloud Foundry Logging and Metrics

Logs?

Page 9: Cloud Foundry Logging and Metrics

Integrating ELK with Cloud Foundry

logsearch

Page 10: Cloud Foundry Logging and Metrics

Integrating ELK with Cloud Foundry

● logsearch● Packages the ELK stack as a BOSH release● It’s completely open source and free!● www.logsearch.io

Page 11: Cloud Foundry Logging and Metrics

Integrating ELK with Cloud Foundry

● logsearch-for-cloudfoundry● Customises logsearch to work with Cloud

Foundry data● Consumes data from both the firehose and the

syslog component log● Provides log dashboards for CF developers1

and as CF operators2

[1] https://www.youtube.com/watch?v=M-ODQwm98YM[2] https://www.youtube.com/watch?v=gWfoHCQUixM

Page 12: Cloud Foundry Logging and Metrics
Page 13: Cloud Foundry Logging and Metrics

Logsearch Overview

Page 14: Cloud Foundry Logging and Metrics

Logsearch Overview

● Ingests logs● syslog (+tls) and relp● firehose via logsearch-for-cloudfoundry

Page 15: Cloud Foundry Logging and Metrics

Logsearch Overview

● Redis● Helps to keep the system stable● Helps to prevent message loss

Page 16: Cloud Foundry Logging and Metrics

Logsearch Overview

● Provides filtering and parsing of logs● Apply your own custom filters

Page 17: Cloud Foundry Logging and Metrics

Logsearch Overview

● Provides storage and indexing

Page 18: Cloud Foundry Logging and Metrics

Logsearch Overview

● Provides front-end web UI● Dashboards● Read-only Elasticsearch API exposed

alongside Kibana

Page 19: Cloud Foundry Logging and Metrics

Logsearch Overview

Page 20: Cloud Foundry Logging and Metrics

Integrating ELK with Cloud Foundry

● upload bosh releases○ logsearch-boshrelease ○ logsearch-for-cloudfoundry-boshrelease

● configure properties○ syslog_daemon_config○ ingestor_cloudfoundry-firehose

● deploy

○ bosh -n deploy

● cloudfoundry-community/logsearch-boshworkspace

Page 21: Cloud Foundry Logging and Metrics

Integrating ELK with Cloud Foundry

● Why should you choose logsearch?

● It’s open source● Extracts the complexity

of managing the ELK stack

● Easy to scale

Page 22: Cloud Foundry Logging and Metrics

Metrics?

Page 23: Cloud Foundry Logging and Metrics

Integrating Graphite with Cloud Foundry

Graphite historian and graphite-nozzle

Page 24: Cloud Foundry Logging and Metrics

Integrating Graphite with Cloud Foundry

● Approach 1 - Using the collector● An optional Cloud Foundry component● Soon to be deprecated in favour of the firehose● Queries CF components’ /healthz and /varz

endpoints● Provides a Graphite historian to send data to

Graphite

Page 25: Cloud Foundry Logging and Metrics

Integrating Graphite with Cloud Foundry

properties: collector: use_graphite: true graphite: address: <IP address of Graphite server> port: 2003

Page 26: Cloud Foundry Logging and Metrics

Integrating Graphite with Cloud Foundry

● Approach 2 - Using graphite-nozzle● Attaches to the firehose and extracts metrics

Events● Parses the metrics Events into a format that can

be sent to StatsD● Available on the CloudCredo Github page

Page 27: Cloud Foundry Logging and Metrics
Page 28: Cloud Foundry Logging and Metrics

Goodbye!Thank you for listening

Colin Humphreys @hatofmonkeysEd King @edking2

@CloudCredo