Skip to content
/ k2rt Public

Dump kafka messages to Redis-Timeseries by pattern

Notifications You must be signed in to change notification settings

slntopp/k2rt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k2rt - Kafka To Redis-Timeseries

Dump kafka messages to Redis-Timeseries by pattern

Setup

  1. Get k2rt (ghcr.io/slntopp/k2rt Docker image recommended)
  2. Set environment variables: KAFKA_HOST, REDIS_HOST, TOPIC
  3. Start

Docker Compose service example:

  k2rt:
    image: ghcr.io/slntopp/k2rt
    environment:
      KAFKA_HOST: kafka:29092
      REDIS_HOST: timeseries:6379
      TOPIC: shadow.reported-state.delta

Note

Add --debug flag to reduce log level to DEBUG

What's going to happen

k2rt will read all messages from TOPIC as JSON and save it to Redis Timeseries as:

Key    = `{Event Key}:{Data JSON Key}`
Value  = Data from JSON(only int, float and bool values are saved)
Labels =
    Label Key   = `Data JSON Key`
    Label Value = Data from JSON(string values)