Back to Skywalking

Kubernetes (K8s) monitoring from Rover

docs/en/setup/backend/backend-k8s-monitoring-rover.md

10.4.07.1 KB
Original Source

Kubernetes (K8s) monitoring from Rover

SkyWalking uses the SkyWalking Rover system to collect access logs from Kubernetes clusters and hands them over to the OAL system for metrics and entity analysis.

Data flow

  1. SkyWalking Rover monitoring access log data from K8s and send to the OAP.
  2. The SkyWalking OAP Server receive access log from Rover through gRPC, analysis the generate entity, and using OAL to generating metrics.

Setup

  1. Setup Rover in the Kubernetes and enable access log service.
  2. Setup eBPF receiver module by the following configuration.
yaml
receiver-ebpf:
  selector: ${SW_RECEIVER_EBPF:default}
  default:

Generated Entities

SkyWalking receive the access logs from Rover, analyzes the kubernetes connection information to parse out the following corresponding entities:

  1. Service
  2. Service Instance
  3. Service Endpoint
  4. Service Relation
  5. Service Instance Relation
  6. Service Endpoint Relation

Generate Metrics

For each of the above-mentioned entities, metrics such as connection, transmission, and protocol can be analyzed.

Connection Metrics

Record the relevant metrics for every service establishing/closing connections with other services.

NameUnitDescription
Connect CPMCountTotal Connect to other Service counts per minutes.
Connect DurationNanosecondsTotal Connect to other Service use duration.
Connect Success CPMCountSuccess to connect to other Service counts per minutes.
Accept CPMCountAccept new connection from other Service counts per minutes.
Accept DurationNanosecondsTotal accept new connection from other Service use duration.
Close CPMCountClose one connection counts per minutes.
Close DurationNanosecondsTotal Close connections use duration.

Transfer Metrics

Record the basic information and L2-L4 layer details for each syscall made during network requests by every service to other services.

Read Data from Connection

NameUnitDescription
Read CPMCountRead from connection counts per minutes.
Read DurationNanosecondsTotal read data use duration.
Read Package CPMCountTotal read TCP Package count per minutes.
Read Package SizeBytesTotal read TCP package size per minutes.
Read Layer 4 DurationNanosecondsTotal read data on the Layer 4 use duration.
Read Layer 3 DurationNanosecondsTotal read data on the Layer 3 use duration.
Read Layer 3 Recv DurationNanosecondsTotal read data on the Layer 3 receive use duration.
Read Layer 3 Local DurationNanosecondsTotal read data on the Layer 3 local use duration.
Read Package To Queue DurationNanosecondsTotal duration between TCP package received and send to Queue.
Read Package From Queue DurationNanosecondsTotal duration between send to Queue and receive from Queue.
Read Net Filter CPMCountTotal Net Filtered count when read data.
Read Net Filter DurationNanosecondsTotal Net Filtered use duration.

Write Data to Connection

NameUnitDescription
Write CPMCountWrite to connection counts per minutes.
Write DurationNanosecondsTotal write data to connection use duration.
Write Package CPMCountTotal write TCP Package count per minutes.
Write Package SizeBytesTotal write TCP Package size per minutes.
Write L4 DurationNanosecondsTotal write data to connection Layer 4 use duration.
Write L3 DurationNanosecondsTotal write data to connection Layer 3 use duration.
Write L3 Local DurationNanosecondsTotal write data to the connection Layer 3 Local use duration.
Write L3 Output DurationNanosecondsTotal write data to the connection Layer 3 Output use duration.
Write L2 DurationNanosecondsTotal write data to connection Layer 2 use duration.
Write L2 Ready Send DurationNanosecondsTotal write data to the connection Layer 2 ready send data queue use duration.
Write L2 Send NetDevice DurationNanosecondsTotal write data to the connection Layer 2 send data to net device use duration.

Protocol

Based on each transfer data analysis, extract the information of the 7-layer network protocol.

HTTP/1.x or HTTP/2.x

NameInitDescription
Call CPMCountHTTP Request calls per minutes.
DurationMillisecondsTotal HTTP Response use duration.
Success CPMCountTotal HTTP Response success(status < 500) count.
Request Header SizeBytesTotal Request Header size.
Request Body SizeBytesTotal Request Body size.
Response Header SizeBytesTotal Response Header size.
Response Body SizeBytesTotal Response Body size.

Customizations

You can customize your own metrics/dashboard panel. The metrics definition and expression rules are found in /config/oal/ebpf.oal, please refer the Scope Declaration Documentation. The K8s dashboard panel configurations are found in /config/ui-initialized-templates/k8s_service.