elasticsearchkibanaelastic-stackmetricbeatdaemonset

Addition of new field in metric beats when it sends data to Elastic cloud


Current situation is all logs from different cluster are mixed in the same index.

I am using metric beats which is running as daemon sets in a cluster. We need same dashboards where we could list out the clusters so that person who views this dashboard could use same dashboard to view different cluster metrics. Is there any ways to do this in Kibana ?

From controls in Kibana am able to create a drop down for user to select but i want to add a new field which will be unique for each cluster. Can we add a such field so that i could sort out logs using controls option.

Please suggest if there is any solution for this


Solution

  • This could by done by a 2 ways : https://www.elastic.co/guide/en/beats/metricbeat/current/add-fields.html

    Please refer the link and add it using processor in input section of metric beat.yml.

    I used 2nd option under output.elasticsearch part of metric beat.yml file add :

    fields_under_root_true : true
    fields:
      <custome-field-name>: value
    

    If dynamic value is required add it in extraenvs and then fetch using ${nameused-in-extraenv}