Logstash: Could not locate field: logstash.host.name

I installed elastic-agent as a service to monitor my server, I then enrolled it with agent policy with various integration, my aim is to use the logstash integration to monitor the logs, in my system logstash is running as a container. But while adding up the logstash integration and then trying to visualize it through dashboard I'm getting this error "Could not locate field: logstash.host.name"

@Kaustub_Gupta - I have a similar issue: used the logstash integration, setup the agent, installed the agent on the logstash server, it seems all metrics and logs are coming in but all the standard dashboards in Kibana do not work and give all kinds of errors like field not found: logstash.host_name and other fields. Also Logstash does not appear in the Stack Monitoring.

I was still not able to find a solution for it. did you get any further?

Hi

I was having a similar issue and found this link:

Most important:

Existing implementations wishing to continue using the Stack Monitoring UI should uncheck the technical preview option, and continue to use Metrics (Stack Monitoring) . Those users who wish to use the technical preview should uncheck Metrics (Stack Monitoring) and check Metrics (Technical Preview)

So I'm currently reverting back to the Stack Monitoring UI, which is showing my data.

If you want to use the dashboards, it seems you need to enable the Technical Preview in the Policy:

Best regards
Christof