There isn't exactly a clean way to do this yet, but I've filed a feature request for it. ID #9051.
There is a way to do this though. On the machine that you have all of the accounts created, run the following command -
Code: Select all
curl -XGET 'http://localhost:9200/nagioslogserver/_search?type=user&pretty' | grep _source | sed -e 's/"_source"://' -e '/nagiosadmin/ d'
This will produce a list of users, similar to below -
Code: Select all
{"name":"frank","username":"frank","email":"[email protected]","password":"fcba8051ec9c89dfa788d2e093b54765629bc153237a2a4d26c0ae959500b4c5","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2016-07-12 11:27:12","created_by":"1","default_dashboard":"\/dashboard\/elasticsearch\/AVXf7wsIHR1LuUxatCko"}
Now, take the information that is pulled from that command, and we can create a CURL request to use on the newly created machine, to add frank in. One thing to note, is the default_dashboard must be changed to
/dashboard/elasticsearch/default. You'll also need to change the number
2 to an increasing value, in the CURL -- so if user id '2' already exists, use '3'. Everything else should be good to copy / paste -
Code: Select all
curl -XPUT 'http://localhost:9200/nagioslogserver/user/2' -d '{"name":"frank","username":"frank","email":"[email protected]","password":"fcba8051ec9c89dfa788d2e093b54765629bc153237a2a4d26c0ae959500b4c5","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2016-07-12 11:27:12","created_by":"1","default_dashboard":"/dashboard/elasticsearch/default"}'