Modifying agent config requires removing the agent asset

Sensu Go 6.6.1

I’ve configured the agents with just the bare minimum config file to connect to the cluster. No subscriptions were defined in the agent configs.

But now I want to add more subscriptions to the agents. I’ve edited the agent config files, enabling this, and then I restarted the agents:

  - http-checks-remote

However, if I do that, in sensuctl entity list nothing has changed. The agents do not get the new subscription.

If I stop the agent, remove it from the entity list, then start the agent again, only then the subscriptions are updated. This seems like an unnecessary complication. How do I avoid it?

I just found what appears to be the solution in another thread. It’s an option that needs to be enabled in the agent config:

agent-managed-entity: true

When that is enabled, changes to the agent config file are reflected in the actual agent state in the cluster.

It’s good to know that there is this dual configuration scheme. I wish the docs made it more obvious.

Anyway, the problem seems solved.