Forgot to mention that i tried re-installing the elastic agent multiple times. Tried version 8.17.0 and 8.17.3 (currently is on this)
I also tried using the tar.gz install approach as well the deb package. Tried as well removing and re-adding just the integration to the policy. All those attempts didnt bring any benefit
I also checked this thread End point security fails for Elastic Agent with error "Missed two check-ins" - #2 by Nick_Berlin but my localhost is present in /etc/hosts
In the error.txt from the diagnostics file in the endpoint-default folder i see this error
diagnostic action timed out, deadline is 20s: context deadline exceeded