Skip to main content
Sumo Logic

Collect Logs and Metrics for the Kubernetes App

This page has instructions for collecting logs for the Sumo App for Kubernetes. Logs are collected and forwarded to Sumo Logic with FluentBit and FluentD. Prometheus collects metrics data for Sumo Logic.

Step 1. Conifgure metric collection

Deploying FluentD and  configuring Prometheus are the two basic tasks for setting up metric collection for Kuberenetes.

To collect metrics for the Kuberntes App, do the following:

  1. Deploy FluentD, as described in Step 1 of this document.
  2. Configure Prometheus, as described in Step 2 of this document.

Step 2. Configure log collection 

To configure log collection, do the following:

Sample log message

Application Logs
{"timestamp":1561534865020,"log":"E0626 07:41:05.020255       1 
manager.go:101] Error in scraping containers from kubelet:192.168.190.54:10255: 
failed to get all container stats from Kubelet URL \"http://192.168.190.54:10255/stats/container/\": 
Post http://192.168.190.54:10255/stats/container/: dial tcp 192.168.190.54:10255: 
getsockopt: connection refused"}

Query sample

Message Breakdown by Container from the Dashboard Container Logs
 cluster = * and namespace = * and pod = * and container = *
| json field=_raw "log" as message
| fields - message | count container | top 10 container by _count