Skip to content
Discussion options

You must be logged in to vote

I use transformation like this, where "message" is field of json from kafka.
Is it correct?

[transforms.my_test_parse]
  type = "remap"
  inputs = ["kafka"]
  source = '''
  . =parse_json!(.message)
  .metric= .
'''
[transforms.my_transform]
  type = "lua" 
  inputs = ["my_test_parse"] 
  version = "2" 

        hooks.process = '''
        function (event, emit)
            event.metric = event.message
            event.log = nil
            emit(event)
        end
        '''

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
2 replies
@petrxpx
Comment options

@spencergilbert
Comment options

Comment options

You must be logged in to vote
1 reply
@spencergilbert
Comment options

Comment options

You must be logged in to vote
7 replies
@spencergilbert
Comment options

@petrxpx
Comment options

@spencergilbert
Comment options

@petrxpx
Comment options

@spencergilbert
Comment options

Answer selected by jszwedko
Comment options

You must be logged in to vote
1 reply
@jszwedko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants