Sensuctl not configuring in opsworks

I have been trying to configure sensuctl in chef using
bash ‘config sensuctl’ do
code <<-EOH
sensuctl configure -n --username ‘sensuadmin’ --password ‘password’ --namespace default --url ‘http://127.0.0.1:9090
sensuctl config view
EOH
action :run
end

This script is running successfully, but when I login into the instance and trying to view the config it is showing
Error: No API URL is defined. You can configure an API URL by running “sensuctl configure”

Can someone help me with this.

The sensuctl configuration is on a per user basis. For example under Linux and macOS it stores its configuration in $HOME/.config/sensu/sensuctl. So in order to use the chef created configuration you would need to login as (or become via sudo) that user.

I think I got my answer.

Thanks :slight_smile: