Kapacitor creating new points when adding new fields

194 Views Asked by At

I'm using Kapacitor to pre-process complex regex searches to optimise my Grafana rendering performance.

This is my Kapacitor script:

dbrp "telegraf"."autogen"

stream
  |from()
   .database('telegraf')
   .measurement('access-log')
   .where(lambda: ("request" =~ /\/service\/endpoint1.*/ OR "request" =~ /\/service\/.*\/endpoint1.*/ ))
  |eval(lambda: 'endpoint1')
     .as('service')
     .keep('service','request')
  |influxDBOut()
    .database('telegraf')
    .retentionPolicy('autogen')
    .measurement('access-log')
    .tag('kapacitor', 'true')

The issue comes when I check the database and Kapacitor has created new points or entries in the database for the processed entries instead of adding the new field to the existing Points.

Is there any way of making Kapacitor to enrich the data instead of duplicating?

0

There are 0 best solutions below