'invalid_index_name_exception' when create a user for kibana server

Hi all,
Currently, I'm trying to use Kibana with shield, but when I execute the command:
curl -u es_admin -XPOST 'http://localhost:9200/logstash-/user/kibana-server'
-d '{"password" : "mypassword", "roles" : [ "kibana4_server"]}'
'logstash-
' is the index I created, I got an error:
{"error":{"root_cause":[{"type":"invalid_index_name_exception","reason":"Invalid index name [logstash-], must not contain the following characters [\, /, , ?, ", logstash-"}],"type":"invalid_index_name_exception","reason":"Invalid index name [logstash-], must not contain the following characters [\, /, *, ?, ", <, >, |, ,},"status":400}
before this, I have done following:

  1. bin/plugin install license
  2. bin/plugin install shield
  3. bin/elasticsearch
  4. bin/shield/esusers useradd es_admin -r admin
    At this time , I executed the command 'curl -u es_admin -XGET "http://localhost:9200/"', get these:
    {
    "name" : "node-1",
    "cluster_name" : "my-application",
    "version" : {
    "number" : "2.3.1",
    "build_hash" : "bd980929010aef404e7cb0843e61d0665269fc39",
    "build_timestamp" : "2016-04-04T12:25:05Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
    },
    "tagline" : "You Know, for Search"
    }
  5. /usr/local/elasticsearch/bin/shield/esusers useradd kibana4-server -r kibana4_server -p password

I don't know how to resolve this problem. Do I have missed some configures or have configured wrong info?
I'm new to plugin shield and elk. So would you please help me to give me any solutions and advices?

Hi,

The command you used is actually trying to create a index named logstash-* with the type user and a document id of kibana_server.

Please see the API documentation for more information https://www.elastic.co/guide/en/shield/current/shield-rest.html#shield-users-rest

Also, if you are just getting started maybe you can use 5.0 with X-Pack. The UI will make creating and managing users easier.

-Jay

Thanks for your reply, and I'll try 5.0 with X-Pack.
But I don't think that command I used is to create an index, I got it from https://www.elastic.co/guide/en/shield/current/kibana.html


I'm uncertain about what '_shield' means.

The command on that page is different as you noted. The _shield part is not an index name or pattern but is instead the prefix for the shield APIs. So you need to use the command like it is on the page, rather than changing it.

Thanks.
That command is to create an user for kibana, so user can login https://localhost:5601.
:blush:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.