Kibana not fetching indices that are present in elasticsearch


(Sunil) #1

I am using Elasticsearch 5.1.1
Kibana 5.1.1 along with x-pack.
I am moving data from postgresql to elasticsearch via logstash.
The data is coming to elasticsearch as I can see the index and number of documents in elasticsearch.
My problem is that kibana is not identfying these indices.

Here is my logstash.conf file

input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:postgresql://192.168.1.107:5432/mydb"
# The user we wish to execute our statement as
jdbc_user => "postgres"
jdbc_password => 'pass@123'
# The path to our downloaded jdbc driver
jdbc_driver_library => "/home/sunil/postgresql-9.4.1212.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
# our query
statement => 'SELECT * FROM "user".details'
}
}
output {
elasticsearch {
hosts =>['1localhost:9200']
user =>'elastic'
password =>'pwd'
index =>'users'
document_type =>'info'
}
}
Data is movig to elasticsearch properly but kibana is not picking up the indices.
Any help is appreciated.


(Tim Sullivan) #2

How are you verifying that data is moving into Elasticsearch properly? If you look at the JSON output from the cat/index API:
http://localhost:9200/_cat/indices/users?v
do you see the document count climbing?

Do you have an index pattern configured in Kibana to have it actually search for anything in this index? If so, do you need to refresh the Index Pattern under Management -> Index Patterns, and click the Refresh button for your pattern?

hosts =>['1localhost:9200']

Not sure if that is just a typo when you pasted in the configuration, but it looks like you are trying to use the default hosts config value, which is localhost:9200 without a 1 in front. If Logstash actually can't connect to the Elasticsearch host though, there should be Logstash error logs you'd be able to see.


(Sunil) #3

By Running http://localhost:9200/_cat/indices/users?v, i am getting the documents count

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open users ZIrrP4NBT6O86d0l5pdb_Q 3 2 471 0 569.7kb 569.7kb

But kibana is still not identifying the index.
i am trying to add the users index in kibana and this is what i am getting

It is unable to identify the index.
In kibana.yml i have set
elasticsearch.url: "http://localhost:9200"
elasticsearch.username: "elastic"
elasticsearch.password: "elastic"

hosts =>['1localhost:9200'] -- this was a typo, it is actually
hosts =>['localhost:9200']


(Sunil) #4

By Running http://localhost:9200/_cat/indices/users?v, i am getting the documents count

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open users ZIrrP4NBT6O86d0l5pdb_Q 3 2 471 0 569.7kb 569.7kb

But kibana is still not identifying the index.
i am trying to add the users index in kibana and this is what i am getting

It is unable to identify the index.
In kibana.yml i have set
elasticsearch.url: "http://localhost:9200"
elasticsearch.username: "elastic"
elasticsearch.password: "elastic"

hosts =>['1localhost:9200'] -- this was a typo, it is actually
hosts =>['localhost:9200']


(Stacey Gammon) #5

It looks like you are logged in as the default Kibana user. I believe this role doesn't have access to create or modify index templates.

Can you try logging in as a super user and then trying to create the index in Kibana? Elastic ships with one by default with username elastic and password changeme (which you may have changed to elastic based on your kibana.yml output pasted above).


(Tim Sullivan) #6

Also, if your data does not have any timestamp fields, you will want to uncheck the checkbox for "Index contains time-based events." I'm not certain, but that could be why Kibana is not able to fetch the mapping.


(system) #7

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