@BenB196 (Ben B196) posted a new topic, subject "Uptime Investigate Dropdown Link Uptime Monitor to Host Metrics/Logs". It read:

   Hi All,
    
    In the Kibana UI > Uptime > Monitors, each monitor is listed. If you expand a monitor, there is a dropdown menu on the right hand side called `Investigate`, in the menu there are options like `Show host logs` and `Show host metrics`. These options always seem to be grayed out in my monitors.
    
    So my question is, how do I go about linking a monitor to a specific group of hosts/pods/containers so that these options actually work?
    
    I wasn't able to find much in the docs about this feature or how it works, so I'm kind of lost here.

Then @riferrei (Ricardo Ferreira) said

    Just like you brought uptime data into Elastic using Heartbeat, you need to bring logs using Filebeat and metrics using Metricbeat. The beats manage to put all the data into a common format called ECS (Elastic Common Schema), enabling Kibana to perform these cross-data links.
    
    For a quick start into Filebeat:
    
    For a quick start into Metricbeat:
    
    — @riferrei

@BenB196 (Ben B196) replied

    Apologies @riferrei I wasn't very clear here. I actually have metrics from Metricbeat and logs from Filebeat for the systems in question, but I can't seem to find a way to get these to link up with the Heartbeat uptime monitors. The heartbeat monitors run remotely (in a standalone Kubernetes cluster) rather than on the hosts themselves.

Then @jkambic (Justin Kambic) said

    Unfortunately if the Heartbeat agent doesn't share a domain (APM) or hostname with the logs/metrics, it doesn't really fit the designed use case. We don't have any revision to this feature on our present roadmap, if you'd like to describe the functionality you're looking for please feel free to create an issue.

To which @BenB196 (Ben B196) replied

    Thanks for this information @jkambic would you by chance be able to provide the field names which currently cause this linking to work? I couldn't find anything in the docs about what fields were actually used here.

Then @shahzad31 (Shahzad) said

    Hi @BenB196
    
    Here are the fields uptime uses to determin links with other integerations from the heartbeat document
    [code] 
        Show APM data --> doc.service.name or doc.url.domain 
        Show host metrics --> doc.monitor.ip 
        Show pod metrics --> doc..kubernetes.pod.uid
        Show container metrics --> doc.container.id
        Show host logs --> doc.monitor.ip
        Show pod logs -->. doc.kubernetes.pod.uid
        Show container logs --> doc.container.id
        
    [/code]
    
    Let me know if this helps.
    
    Regards

To which @system (system) replied

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

After which, @Andrew_Cholakian1 (Andrew Cholakian) added

    You can set the `service_name` option in heartbeat to link a service, even if it has a different URL!


{'source': 'discourse', 'url': 'https://discuss.elastic.co/t/uptime-investigate-dropdown-link-uptime-monitor-to-host-metrics-logs/288419', 'title': 'Uptime Investigate Dropdown Link Uptime Monitor to Host Metrics/Logs', 'views': 315, 'has_accepted_answer': False, 'word_count': 471, 'like_count': 1, 'reply_count': 5, 'participant_count': 5, 'posts': 8, 'tags': '', 'author': '@BenB196 (Ben B196)', 'participants': '@BenB196 (Ben B196), @riferrei (Ricardo Ferreira), @jkambic (Justin Kambic), @shahzad31 (Shahzad), @system (system), @Andrew_Cholakian1 (Andrew Cholakian)', 'image_url': [None], 'created_at': '2021-11-04T14:24:19.262Z', 'last_posted_at': '2021-12-17T13:57:08.532Z'}