Certificates between Filebeat and Kibana for Filebeat to do setup.dashboards.enabled: true

Well, back from the holidays, this is what I now think. I hope this comment helps someone else.

Especially since our multiple Filebeat containers are running potentially (very likely) on different hosts, we don't want to use filebeat.yml to install dashboards in Kibana. Instead, we'll do it in our greater, ELK container. Right now, for instance, we're using the saved-object API in Kibana to preinstall our index pattern ("filebeat-*") and we'll find a similar solution for any dashboard we choose to deploy:

preinstall-index-pattern.sh :

#!/bin/sh
# Preinstall index pattern "filebeat-*" for Kibana's use:
curl -X POST \
  "http://localhost:5601/api/saved_objects/index-pattern/filebeat-pattern" \
  --header 'kbn-xsrf: true' \
  --header 'Content-Type: application/json' \
  --data '\
    {\
      "attributes" :\
      {\
        "title"         : "filebeat-*",\
        "timeFieldName" : "@timestamp",\
        "notExpandable" : true\
      }\
    }'

This works; we don't need keys and certificates, etc., though in terms of automatic installation, I don't yet know if we're going to have to jury-rig it using ENTRYPOINT in Dockerfile or find some other way to set it off after Kibana's API is up.

1 Like