abhisek
(Abhisek Mohanty)
September 20, 2017, 7:01am
1
Hi,
I have installed X-pack and now when i am trying to add new indices, it is not happening.
when i'm checking for all the indices using the command
curl '10.1.1.150:9200/_cat/indices?v'
then i'm getting following error
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/_cat/indices?v]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication token for REST request [/_cat/indices?v]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
warkolm
(Mark Walkom)
September 20, 2017, 7:22am
2
Did you pass in the user and password with the curl request?
abhisek
(Abhisek Mohanty)
September 20, 2017, 7:26am
3
No.
are you talking about this ?
abhisek
(Abhisek Mohanty)
September 20, 2017, 7:42am
4
using the following command i'm able to see all the indices
curl --user rdeniro:taxidriver -XPUT '10.1.1.150:9200/_cat/indices?v'
But i have a doubt that do i need to pass the user and password while loading the data .
abhisek
(Abhisek Mohanty)
September 20, 2017, 9:26am
6
As i'm using configuration file to load the data and i'm not able to find any example related to that, where should i add user and password.
my configuration looks like this :
/usr/share/logstash/bin/logstash -f /opt/final_log.conf --path.data /opt/dir1
warkolm
(Mark Walkom)
September 20, 2017, 9:41am
7
It would be in the Logstash file where you have configured the details to talk to Elasticsearch.
abhisek
(Abhisek Mohanty)
September 20, 2017, 10:22am
8
Thanks for the reply
I have added user and password in my logstash file and then tried to run it, the data gets loaded but after that also i'm not able to see my index.
my config file looks like this
input {
file {
path => "/opt/payment_data/queue_data*"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["seq_num","card","type0","country","status","txnId","amount","Acquire_Id","AcqAccNo","Acquire_name","Mkey"]
}
mutate {convert => ["txnId", "integer"]}
mutate {convert => ["amount", "integer"]}
mutate {convert => ["status", "integer"]}
}
output {
elasticsearch {
hosts => ["http://10.1.1.150:9200"]
user => "elastic"
password => "changeme"
index => "newpayment"
}
stdout {}
}
abhisek
(Abhisek Mohanty)
September 21, 2017, 4:43am
9
@warkolm is my config correct .
If yes, then why i'm not able to see my index ?
i have used an example to check whether index are being loaded or not
curl --user elastic:changeme -XPUT '10.1.1.150:9200/test?pretty' -H 'Content-Type: application/json' -d'
{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"type1" : {
"properties" : {
"field1" : { "type" : "text" }
}
}
}
}
'
an index of name text
can be seen in my index list.
but not with the above config file.
system
(system)
Closed
October 19, 2017, 4:43am
10
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.