Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No SPRIG Functions useable in output: gotemplate #4363

Open
HenrikWittemeier opened this issue Oct 23, 2024 · 1 comment
Open

No SPRIG Functions useable in output: gotemplate #4363

HenrikWittemeier opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels

Comments

@HenrikWittemeier
Copy link

HenrikWittemeier commented Oct 23, 2024

Description

I try to change the output format of the Tracee events. Therefore i need the usage of Sprig functions which should be possible according to the Documentation

Go template can utilize helper functions from [Sprig](http://masterminds.github.io/sprig/).

But even if i choose an example goTemplate for parsing:


values.yml
configFile: |-
  output:
    gotemplate:
      template: /tracee/templates/rawjson.tmpl
      files:
        - stdout

I get following error:

Error: printer.(*templateEventPrinter).Init: template: rawjson.tmpl:1: function "toJson" not defined

Output of tracee version:

Tracee Version v0.22.0

Output of uname -a:

Linux tracee-hqmbk 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 GNU/Linux

Thank you your great support 🥇

@HenrikWittemeier HenrikWittemeier changed the title No SPRIG Functions found in output: gotemplate No SPRIG Functions usable in output: gotemplate Oct 23, 2024
@HenrikWittemeier HenrikWittemeier changed the title No SPRIG Functions usable in output: gotemplate No SPRIG Functions useable in output: gotemplate Oct 23, 2024
@rscampos rscampos self-assigned this Oct 24, 2024
@rscampos
Copy link
Collaborator

@HenrikWittemeier thank you to report this... will have a look on this as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants