New Fields Not Visible in Kibana - elasticsearch

I have Kibana 4.0.1 running on top of elasticsearch 1.4.4. It was very smooth and virtually had no setup time. Suddenly I have run into a problem.
If I add a new field in my elasticsearch index, it's not visible in fields section. I can still query on that field in discover section. But, I can't make a graph based on the new field as it's not visible in fields list.
Kibana apparently fetches _mapping at the time of setup and stores it in elasticsearch index named .kibana. Once done, it never changes that. Deleting this index should load fresh _mapping from elasticsearch. But I don't want to lose all the saved dashboards and visualizations.
Is there a was to force Kibana to load fresh mapping at regular interval?

Yes in the settings tab you can refresh the index. Check the yellow refresh botton in the image below.

Related

Kibana 7.11 - index-pattern export not showing any fields

I have created an index-patter in kibana (7.11) in the UI and i can see all the fields configured correctly. But when i go to Saved objects and export it, it doesn't contain any fields
{"attributes":{"fieldAttrs":"{}","fields":"[]"...
Is there something i am missing here?
I have another index-pattern created by journalbeat which exports correctly with all the configured fields.
Thanks
I have faced the same issue. Starting Kibana 7.11, index patterns as saved object contain no more field detail. The list of field is prepared on load.
Elastic added a changelog entry here finally:
In index pattern management - Refresh button removed as index pattern field lists are refreshed when index patterns are loaded, such as on page load or when moving between kibana apps

Kibana Discover is not working after deleted all indices and adding new indices

I ran the following command to delete all indices to see changes on the Kibana:
$ curl -XDELETE localhost:9200/_all
after this operation, Kibana being not visualized Data. It is not working anymore.
I extracted new kibana folder and set up again all configuration and see the indices on the Dev Tools tab. But These indices are not showing in Discover tab.
Sefa.
You need to recreate your index pattern under Management -> Index Patterns — see the documentation for index patterns.
Your index should be logstash-* and the timestamp value #timestamp in the dropdown.
To get better understanding of your problem open the page in the console of your web browser. You will see the error as "some default index not found"
Kibana always loads on a default index. You have eliminated even that pattern.
So set the default index patter again and you will be good to go

How to create a Kibana (Elasticsearch) Scripted Field programatically?

Kibana's UI allows the user to create a scripted field which is stored as part of the index (screenshot below). How can that be done programatically? In particular, using either the NEST client or the Elasticsearch low level client.
Kibana UI for the Indice with the Scripted Fields tab highlighted
Note that I am not asking how to create add an expression/script field as part of a query, I'm specifically looking for how to add it as part of the Index when the mapping is created so that queries can reference it without having to explicitly include it.
Kibana dashboards are stored in the .kibana index. To export dashboards, you can query the Kibana index as you would any other index. For example, curl -XGET http://localhost:9200/.kibana/_search?type=dashboard&pretty would show the JSON for your dashboards. You could export the template, add the scripted field to the JSON, and then POST it again. Since Kibana uses a standard Elasticsearch index, the normal Elasticsearch API would apply to modifying Kibana dashboards. This may provide a little more clarification.
At the time of writing, current version 5.2 does not have an official way to do this.
This is how I do it:
Get index fields: GET /.kibana/index-pattern/YOUR_INDEX
Add your scripted field to _source.fields (as string, notice scaped quotation marks)
"fields":"[...,{\"name\":\"test\",\"type\":\"number\",\"count\":0,\"scripted\":true,\"script\":\"doc['area_id'].value\",\"lang\":\"painless\",\"indexed\":false,\"analyzed\":false,\"doc_values\":false,\"searchable\":true,\"aggregatable\":true}]"
Post back _source json to /.kibana/index-pattern/YOUR_INDEX
{
"title":"YOUR_INDEX",
"timeFieldName":"time",
"fields":"[...,{\"name\":\"test\",...}]"
}

Simple Kibana table refresh data not changing

I am very new to Elasticsearch and Kibana. I have setup an index with a number of documents that I want to monitor as a table on the dashboard.
The JSON documents stored in elastic search simply have four fields.
I created/saved a search on the discover tab with all four fields and then added that search to my dashboard.
I then set the auto refresh to every 5 seconds.
If I update an existing document the table does NOT change on the next refresh.
If I add/remove new documents to elasticsearch they appear/disappear in the table on the next refresh.
Table flickers every 5s so it is clearly re-rendering.
Examining the network traffic shows that the response to the query contains the new data.
Pressing the arrow drop-down next to the row in the table shows the correct data
Refreshing the entire page shows the new data
Am I missing something?
With Kibana 4.4.2 adding a Search to the Dashboard does not seem to update dynamically. This may or may not be by-design or a bug.
But thanks to the elasticsearch forums I did get this response.
Summary: Creating a table visualization and splitting the rows and adding each individual term as updates when the data changes.

Kibana spinning for a long time

We just create an ES with kibana installed. There are two indices within it. One index is just for test which has 1000 documents. I search in Kibana and it works well and returned result immediately. The other index I push real data with 40,000 documents. When I search something, kibana _source section keep spinning for >50 minutes while the 'Document Types' section return immediately.
I used curl tool to query the second index manually and it return immediately.
I compare the mapping of these two indices and only difference is I didn't use 'store' -> true in second document for some properties(some used). Is this a possible reason?
This is resolved. The fact is I added a json document without quote. ES is smart to fix it but not in _source. However, Kibana utilize _source in the table field.

Resources