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 ‘
sensuctl config view
action :run

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: