mutt13y
(Stuart Gall)
September 25, 2020, 10:55am
1
Hi I was experiencing this issue, I see it has been reported previously.
Hi,
Kibana 6.7.1
I started to face a weird behavior with Kibana, for an unknown reason when logging in to Kibana it complains that there's no default index-pattern configured
I then chose one of the index-pattern from the list and set it as the default, a few minutes later (less than an hour usually), the default index-pattern disappear again.
Looking at the Kibana's setting API (/api/kibana/settings) gives this:
With default index-pattern in place:
{"settings":{"buildNum":{"userValue":202…
As it seems there were no solutions I though I would post my findings.
I determined that the cause was that I had defined a catchall index-template with a lifecycle policy.
The idea was to only keep any unknown index names for 3 days.
This worked fine until we upgraded. I am guessing that .kibana index was recreated and then had the lifecycle policy applied.
there is no warning when creating a '*' index template. IMO this should not apply to system indices.
I raised a bug with elastic
opened 04:19PM - 24 Sep 20 UTC
closed 03:43PM - 28 Sep 20 UTC
>bug
needs:triage
<!--
GitHub is reserved for bug reports and feature requests; it is not the pla… ce
for general questions. If you have a question or an unconfirmed bug , please
visit the [forums](https://discuss.elastic.co/c/elasticsearch). Please also
check your OS is [supported](https://www.elastic.co/support/matrix#show_os).
If it is not, the issue is likely to be closed.
For security vulnerabilities please only send reports to security@elastic.co.
See https://www.elastic.co/community/security for more information.
Please fill in the following details to help us reproduce the bug:
-->
**Elasticsearch version** (`bin/elasticsearch --version`):
7.9.1
**Plugins installed**: []
**JVM version** (`java -version`):
openjdk version “14.0.1” 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing)
**OS version** (`uname -a` if on a Unix-like system):
Centos7
3.10.0-957.27.2.el7.x86_6
**Description of the problem including expected versus actual behavior**:
Default index template with lifecycle policy applies to system indices
**Steps to reproduce**:
1. Create lifecycle policy with delete after N days
2. Create index template to apply lifecycle and match '\*'
3. In reality perform some upgrade which creates a new system index, to test delete .kibana
now the new lifecycle policy is applied to .kibana and settings will be lost every N days
This is a latent issue since most system indices will be created before the template in normal operation but after an upgrade the index can be replaced and so the policy is applied.
I think that '\*' should not match indices that start with a '.' we should have to explicitly use '.\*' or have a flag to indicate if it applies to system indices.
Certianly from an end user perspective there seems to be nothing obviously wrong with defining a catchall template with an aggressive lifecycle policy
![Screenshot 2020-09-24 at 16 14 20](https://user-images.githubusercontent.com/39803837/94171776-957a0d00-fe89-11ea-8f6e-2aa05252bb12.png)
![Screenshot 2020-09-24 at 17 13 20](https://user-images.githubusercontent.com/39803837/94171804-9ca11b00-fe89-11ea-854a-ec599b2e0a06.png)
P.S.
Work around is to create a policy matching ".\*" with a lower priority
I am only mentioning it here in case others experiance the same issue.
I resolved it by creating a template to match ".*" with no life cycle and a very low priority.
1 Like
Thanks for sharing your finding @mutt13y !
system
(system)
Closed
October 26, 2020, 10:16am
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.