7. Orchestration
Container
POD
Node Node 1
POD 1
Namespace
ns1
Kibana Elasticsearch
POD 2
Namespace
ns2
Redis
Services (proxy)
Replication
Controllers
DaemonSets
3
HorizontalPod
Autoscaler
8. Kubernetes Dashboard / Heapster
•Current status
•Shows basic resource usage
for workloads (Pod)
•Simple logs view
•Heapster is required for
autoscaling features
18. Alternatives?
Docker
Log files
json-file or
journald
API
Agent
Remote
Log Storage
Disk
Buffer
Docker API
provides
the most complete
information!
Reliable networks and
backend services?
Better buffer & retransmit
in case of failure!
Attach metadata
to logs/metrics or
route data to
different servers
or indices?
“docker logs”
works & logs are
stored on local
disk!
Centralize search,
analytics, alerts,
access permissions
Parse logs
19. Automatic tagging of logs, metrics, events
• Automatic tagging of log / metrics with
• Docker
• Container Name / ID
• Image Name / ID
• Labels / Environment
• Hostname / IP
• Kubernetes
• Namespace, Pod Name , UID
• Swarm
• Swarm Service Name , ID, Compose Project, Container # (scale)
• Single collector for logs, metrics, events, metadata
• Base for correlation and visualisation
23. Smart monitoring agent - all in one
Docker
API
Agent
Remote
Storage
Disk
Buffer
Docker API
provides
Labels, Metrics,
Logs, Events …
Reliable networks and
backend services?
Better buffer & retransmit
in case of failure!
Auto-tagging
using container
labels.
Discovery of
services Centralize logs, metrics,
analytics, alerts, access
permissions
Metrics,
Logs,
Events
24. Integrate application monitoring in the stack
-Custom images
- add/remove
app with all req. options
-Start monitoring,
reading config from etcd
App
Config to expose
metrics
App Monitor
Configured for App
Container
Service Discovery
etcd
consul
25. Auto Discovery via Docker API and Labels?
App Container
config to expose
metrics
App MonitorDocker Monitor
run
discovery
Docker
Automatic
run
33. Limit container resources for your apps!
•Set CPU quotas cpu-quota=6000
•Limit Memory and configure App in container to the same limits!
m 512mb
•Disable Swap: memory-swap=0
•To limit a Docker container from eating all your disk IO use
e.g. device-write-bps /dev/sda:1mb
34. Automatic Deployment of monitoring agents
• One command to run a service
on each node joining the cluster
• Kubernetes:
• DaemonSet creates a pod per
node
kubectl create -f
sematext-agent.yml
• Swarm:
• Global Service docker
service create –mode
global ...
40. Summary
•Setup of Monitoring & Logging is complex in dynamic environments
•Kubernetes != Swarm (yet). Common base: Docker Containers
•Smart Agents to collect, analyze, aggregate metrics, events and logs
• Auto discovery of containers for data collection
• Use metadata tag metrics & logs as base for correlation and visualization
• Integrate monitoring in application stacks for app specific metrics
• Auto Discovery of services and automatic configuration for application level
monitoring
41. We are engineers!
We develop DevOps tools!
We are DevOps people!
We do fun stuff ;)
join us
http://sematext.com/jobs
is hiring!
42. Thank you for listening! Get in touch!
Stefan Thies
stefan.thies@sematext.com
@seti321
http://sematext.com
@sematext
join us
http://sematext.com/jobs
Come talk to us
at the booth