Create custom fields for each host in heartbeat.yml

I am trying to combine my heartbeat visualization with APM visualization in same dashboards. Since the field names are not similar, the filter wont work correctly. So I was thinking of creating similar field names and labels per host in heartbeat.
For eg:- For each host that is monitored add custom fields like labels.region , etc.

Is it possible to add custom fields for each hosts in heartbeat.yml . Can this be used to add custom labels for hosts ?

Yes, you can use either the fields or processors option under each monitor to do this. See our common monitor options docs.

1 Like

Thanks ..Could you pls provide an example of the heartbeat.yml with additional fields configured for each host being monitored .. as I am having trouble putting multiple processors

So for each monitor you could do something like this...

- type: http
  name: spatial-services
  id: spatial-services
  enabled: true
  schedule: '@every 10s'
  ipv4: true
  ipv6: true
  mode: any
  timeout: 16s
  wait: 1s  
    - ""
  fields_under_root : true
    app_env: Prod
    app_name: "Geocoding Service" 
    app_id: APP001234
    app_tier: 1
    app_resovler_group: geo-services-sre
    app_country: USA
    app_region: AMER
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.