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

Allow setting extra fields from values #31

Open
mosheavni opened this issue Mar 24, 2021 · 0 comments
Open

Allow setting extra fields from values #31

mosheavni opened this issue Mar 24, 2021 · 0 comments

Comments

@mosheavni
Copy link

Hi,
can you please adjust the templates to allow filebeat.yml to have additional fields as part of the regular helm values?
https://www.elastic.co/guide/en/beats/filebeat/current/add-fields.html

I'd like to set it like this:

helm install --namespace=kube-system \
--set secrets.logzioShippingToken='lzrBhFcnLQCGtdFPhpgRbnaLDKvnZhzw' \
--set secrets.logzioRegion='<<LISTENER-REGION>>' \
--set secrets.clusterName='<<CLUSTER-NAME>>' \
--set extraFields.environment='staging' \
--set extraFields.foo='bar' \
logzio-k8s-logs logzio-helm/logzio-k8s-logs

and it will generate the config like this:

      filebeat.autodiscover:
        providers:
          - type: kubernetes
            node: ${NODE_NAME}
            hints.enabled: true
            hints.default_config:
              type: container
              paths:
                - /var/log/containers/*-${data.kubernetes.container.id}.log
            include_annotations: '*'
      processors:
        - add_cloud_metadata: ~
        - add_fields:
            target: ''
            fields:
              foo: bar
              environment: staging
      fields:
        logzio_codec: ${LOGZIO_CODEC}
        token: ${LOGZIO_LOGS_SHIPPING_TOKEN}
        cluster: ${CLUSTER_NAME}
        type: ${LOGZIO_TYPE}
      fields_under_root: ${FIELDS_UNDER_ROOT}
      ignore_older: ${IGNORE_OLDER}
      output:
        logstash:
          hosts: ["${LOGZIO_LOGS_LISTENER_HOST}:5015"]
          ssl:

Thanks.

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

Successfully merging a pull request may close this issue.

1 participant