Elastic-agent does not send metrics to Logstash

I recently installed a stand-alone Elastic Agent version 8.11.3.
I configured the agent to send metrics to the Logstash server and to collect metrics from the server on which it is installed. However, I do not see any data coming in, nor do I see any entries in the log file indicating that it is collecting data.

  1. There is communication between the servers.
  2. My Logstash server is functioning correctly and receiving metrics through URL and open to port 5044.
  3. My agent YML:
fleet:
  enabled: false

output:
  default:
    type: logstash
    hosts: ["My Server:5044"]

agent.monitoring:
  logs: true
  metrics: true
  enabled: true

agent.logging.metrics.enabled: true
agent.logging.metrics.enabled: 10s
agent.logging.level: debug

input:
  - id: metrics
    type: beat/metrics
    use_output: default

I would appreciate your assistance

@Viktor_Movita Welcome to the Elastic communtiy.

Anything coming in Elastic Agent logs ?

I don't see metrics records on the agent's log.
I do see a recurring process of starting and stopping the agent in the log, but I couldn't figure out why:

Capabilities file not found in /etc/elastic-agent/capabilities.yml
Determined allowed capabilities 
Loading baseline config from /etc/elastic-agent/elastic-agent.yml
Parsed configuration and determined agent is managed locally
Starting status endpoint
Metrics endpoint listener on 127.0.0.1:6791
Starting grpc control protocol... 
Configuration changes detected
Updating running component model
Updating running component model
Signal \"terminated"\ received 
Shutting down Elastic agent and sending last events...
Shutting down completed
Elastic agent started

The issue was resolved – the agent was previously connected to the Fleet server and was disconnected for standalone operation (of course with full and correct configuration). When a fresh clean installation of the agent was performed, the issue was resolved.