View in #sensu-go on Slack
@george.bolo: any examples of a config file for
@george.bolo: hey @aaronsachs is this token valid for non enterprise?
@aaronsachs: Lol, so
All Sensu packages now are essentially enterprise
If you purchase it, you apply a license file
But that doesn’t really apply to the access token
So essentially you can ignore the “edition” value
@george.bolo: this is strange, because when i do
sensuctl configure I pass in user/pass combo (along with url)
accordingt o help command it shows this:
--config-dir string path to directory containing configuration files (default "/root/.config/sensu/sensuctl")
i have not dealt with retrieving API tokens yet?
So is it erroring out when you try and run the configure command?
@george.bolo: @aaronsachs sorry, i meant can i put my crdentials here? how do i get an api token?
@aaronsachs: That’s where those two examples I provided get stored
@george.bolo: do i need api token or can i put username and password there?
@aaronsachs: You don’t need it
Doing something like
sensuctl user create test -p garbageplaintext --config-dir "/home/asachs/.sensu/test" --api-url [http://192.168.99.100:8080](http://192.168.99.100:8080) will be fine
And that will create a user with a config dir
Does that make sense?
I feel like I might not be understanding your question fully
@george.bolo: well the problem is i need to configure my credentials first:
Error: Unable to locate credentials. You can configure credentials by running "sensuctl configure
so im trying to automate this
@george.bolo: i was hoping to push a config file for sensuctl so its preconfigured for administrative tasks
then i can wrap it for now. until the api is stable
i know by default the user
admin/P@ssw0rd! is present
is there a non-interactive way (hopefully by config file) which i can configure
sensuctl to use this admin user?
@aaronsachs: There is
Lemme check, since I know my team has been looking at this exact thing
@george.bolo: ok i think i got it:
sensuctl configure --username admin --password 'P@ssw0rd!' --url '[https://fqdn:8080](https://fqdn:8080)' --non-interactive
this will generate those config files (with API token)
thanks for the hints @aaronsachs
glad to help!