Sensu agent doesn't connect with the backend

Hello,

I work on sensu 5.16 on aws.

I install the agent on my ec2 instance, he’s up and running, i modify the backend–url in agent.yml find below :

agent configuration

#backend-url:

- “ws://10.133.49.245:3000”

#cache-dir: “/var/cache/sensu/sensu-agent”
#config-file: “/etc/sensu/agent.yml”
#disable-assets: false
log-level: “debug” # available log levels: panic, fatal, error, warn, info, debug

Also i curl the api and it doesn’t return error.

But the backend doesn’t recognize the agent.

Thanks for your help.

Hey!
Typically port 3000 is the sensu web-ui not the agent websocket.

Typically you’ll want something like “ws://X.X.X.X:8081” if you are using the default websocket port.

Hello,

Thanks for your quick reply.

I double check my cluster, i modify the backend.yml and the agent.yml to communicate on the right port.

Now my curl return a missing credentials and i saw that in the agent.yml there is an authentification confirguration do i have to create a user assign to my agent to authorize him a backend connection.

Thanks for your help.

I’d look at @palourde’s answer in this other post:

The backend, with a couple of exceptions, requires authing to get any info, you’ll need to either use your token, or create an API key. See https://docs.sensu.io/sensu-go/latest/api/auth/