Fleet managed elastic agent enrolled as standalone via AzDo pipeline

We are installing elastic agents onto WS2019 VMs via Azure DevOps pipelines.
In the pipeline in one particular stage/task there is one powershell script that installs different packages on the server and Elastic Agent is among them (installed last).
Everything runs fine and agent seems to be installed and running on the server, but it is not present in the Fleet UI. It is not shipping data to elastic.

Here is the output from the pipeline.

How its elastic-agent.yml looks like:

From the log we can see that is installed as a standalone. Can't see any other issue in the log.

Not sure what is the issue, any suggestions how to troubleshoot?

Kind regards,
Dane

Just to add that we are using Elastic Cloud and we recently upgraded to 7.13.1

We are (of course) using Enroll in Fleet command for Windows platform.
And this is how our policy looks like:

When I run the command manually on the server, agent shows in Fleet and works fine.

Any help is appreciated.

Thanks,
Dane

Based on your first message that Elastic Agent was not enrolled into Fleet. So it is running in standalone mode. You need to run the install command with the --url and --enrollment-token parameters so it will enroll into the Fleet. Only then will that installed Elastic Agent get the policy you created in Fleet.

Hi Blake,

Thank you for your response.

I can see now where is the issue. --url was wrong in our command. We were trying to enroll it to Kibana and not Fleet endpoint.

I'll close this ticket as this should work now.

Kind regards,
Dane

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