Need help with Sensu agent config file for docker container

Dear Team/All,

Need your help with usage of config file(agent.yml) for sensu agent container, I have seen the official docs and workshop github page looks very much elegant and easy to understand.

But unfortunately am stuck with this , my agent.yml only contains wss and trusted-ca certificate details and once container is started it is picking default configuration i.e ws not wss. may be i did something wrong or i dont know what am missing in the docker-compose or config file in the end it is not working.

Am using the latest version of docker image that 6.3.

Logs:
#################################
sensu-agent_1 | {“component”:“agent”,“level”:“info”,“msg”:“starting TCP listener on address: 127.0.0.1:3030”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“level”:“info”,“msg”:“connecting to backend URL “ws://3591a66e8df0:8081"”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“event”:{“Title”:“Gostatsd started”,“Text”:“Gostatsd started”,“DateHappened”:1622301435,“Hostname”:“3591a66e8df0”,“AggregationKey”:”",“SourceTypeName”:"",“Tags”:null,“SourceIP”:"",“Priority”:1,“AlertType”:0},“level”:“info”,“msg”:“statsd received an event”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“level”:“info”,“msg”:“starting api on address: 127.0.0.1:3031”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“error”:“dial tcp docker:ip:8081: connect: connection refused”,“level”:“error”,“msg”:“reconnection attempt failed”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“level”:“info”,“msg”:"connecting to backend URL “ws://3591a66e8df0:8081"”,“time”:“2021-05-29T15:17:15Z”}
sensu-agent_1 | {“component”:“agent”,“error”:“dial tcp docker:ip:8081: connect: connection refused”,“level”:“error”,“msg”:“reconnection attempt failed”,“time”:“2021-05-29T15:17:15Z”}

########################################
docker-compose


version: “3”
services:
sensu-agent:
image: sensu/sensu:latest
ports:
- 3031:3031
volumes:
- “sensu-agent:/var/lib/sensu”
- “./config/agent.yml:/etc/sensu/agent.yml”
command: "sensu-agent start -c ‘/etc/sensu/agent.yml’ "
restart: always
volumes:
sensu-agent:
driver: local

#####################################
./config/agent.yml contains


agent configuration

name: “test-agent”

namespace: “default”

subscriptions:

  • “system”

backend-url:

  • “wss://127.0.0.1:8081”

authentication configuration

user: “agent”
password: “P@ssw0rd!”

api configuration

#api-host: “127.0.0.1”
#api-port: 3031
#disable-api: false

socket configuration

#disable-sockets: false
#socket-host: “127.0.0.1”
#socket-port: 3030
trusted-ca-file: ‘/custom/path/ca-trust.pem’

Appreciate your help if you can let me know what am missing here.

Thanks in Advance,
Sensu-user