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

error on env var parsing #54

Open
jesusch opened this issue Nov 16, 2022 · 0 comments
Open

error on env var parsing #54

jesusch opened this issue Nov 16, 2022 · 0 comments

Comments

@jesusch
Copy link

jesusch commented Nov 16, 2022

`

api_version: core/v2
type: Handler
metadata:
  name: influxdb
spec:
  type: pipe
  command: sensu-influxdb-handler
  env_vars:
   - INFLUXDB_BUCKET="{{ .Check.Namespace }}"
  filters:
  - has_metrics
  runtime_assets:
  - sensu/sensu-influxdb-handler

`

results in:
"msg":"event pipe handler executed","output":"2022/11/16 14:37:10 influxdb2client E! Write error: not found: bucket "{{.Check.Namespace}}" not found\nError executing sensu-influxdb-handler: error executing handler: write failed (attempts 0): not found: bucket "{{.Check.Namespace}}" not found\n"

I've tried {{.Check.Namespace}} as well as {{.Entity.Namespace}}

Also I've noticed that ENV vars are parsed wrong - even if the are strings
e.g.

INFLUXDB_BUCKET="somestring"
vs.
INFLUXDB_BUCKET=somestring

the first one preserves the quotes (which is wrong?)

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

No branches or pull requests

1 participant