charts icon indicating copy to clipboard operation
charts copied to clipboard

[stable/kibana] Configure default index pattern

Open jnsvd opened this issue 7 years ago • 9 comments

Is this a request for help?: No

Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

Configure default index pattern

Allow a user of the chart to specify a default index pattern in values.yaml.

I've seen that dashboards are loaded into Kibana using an initContainer. In the same way, we could create a default index pattern: https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html

I would like to contribute on this if you think this would be a good feature to add, but do have a few questions:

  • Do we extend the initContainer such that it can handle more than just dashboards? E.g., also a default index pattern and potentially more objects in the future
  • Would a PostHook be a good candidate to implement this?

Which chart: stable/kibana

jnsvd avatar Apr 10 '19 12:04 jnsvd

I also want this request. @jnsvd do you have a workaround?

dingko avatar Apr 25 '19 10:04 dingko

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar May 25 '19 10:05 stale[bot]

This issue is being automatically closed due to inactivity.

stale[bot] avatar Jun 08 '19 10:06 stale[bot]

I ran into a situation today where this feature would be greatly beneficial. Can it be reactivated please?

kz1000fan avatar Jul 29 '19 19:07 kz1000fan

Can we reopen? It is a good feature request in Kubernetes

SCLogo avatar Mar 09 '20 10:03 SCLogo

+1

chattarajoy avatar Jun 26 '20 08:06 chattarajoy

+1

gitpushforcemain avatar Jun 29 '20 12:06 gitpushforcemain

+1

encigem avatar Sep 21 '20 09:09 encigem

I also want this request. @jnsvd do you have a workaround?

The following can be added to Kibana's values.yaml, to create a default Index Pattern on deployment

lifecycle:
  postStart:
    exec:
      command:
      - bash
      - -c
      - |
        #!/bin/bash
        # Config the index_pattern
        TEMPLATE_NAME=deault_logstash
        INDEX_PATTERN="logstash-*"
        KIBANA_URL=http://localhost:5601
  
        # Wait until service is ready
        while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $KIBANA_URL/app/kibana)" != "200" ]]; do sleep 1; done
  
        # Apply default Index Pattern into Kibana
        curl  -X POST -v $KIBANA_URL/api/saved_objects/index-pattern/$TEMPLATE_NAME \
        -H 'kbn-xsrf: true' -H 'Content-Type: application/json' \
        -d '{"attributes": {"title": "'$INDEX_PATTERN'"}}'

encigem avatar Sep 21 '20 14:09 encigem