Something I don't get with new alias api in 1.4 and it's impact on kibana3

Hello All,
First thanks a lotfor the great work on the ELK stack!

This post is both about elasticsearch and kibana3. There is something I
dont get in the breaking change changelog of 1.4 about alias api:

« The get alias api will return a section for aliases even if there are no
aliases. This ensures that the following two examples are equivalent:
curl -XGET 'http://localhost:9200/_all/_aliases'
curl -XGET 'http://localhost:9200/_aliases' »

The behaviour I had with 1.2.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
will return a json that list all indices in the cluster even when no alias.
Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-pouet" : { <- non aliased index
"aliases" : { }
},

"blabla-prout" : { <- aliased index
"aliases" : {
"blabla-yeah" : { }
}
},

}

The behaviour I get with 1.4.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
shows only the indices that do have at least one alias. When no alias it
shows nothing. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-prout" : { <- aliased index only
"aliases" : {
"blabla-yeah" : { }
}
}
}

To me it seems the change is rather: 1.4 no longer show indices that don't
have aliases in the /_all/_aliases, but as a non excellent english speaker
I may misunderstand it.

The scond thing is I have the impression that it breaks my kibana3 setup as
when loading a dashboard, I can see kibana send a query for
http://es-api-endpoint>:9200//_aliases?ignore_unavailable=true&ignore_missing=true
and since 1.4 this results in an empty list. After that kibana only sohw a
warning about 'there is no index that match your query'

I am able to work around by adding a dummy alias to all the indices. This
allow the aforementionned call from kibana3 to succeed and data is
displayed. I post this here as I dont really know if it belongs to
elasticsearch or kibana3, and if someone had the same problem and have a
better solution,please say it!

Thanks & have a nice day!
Erick

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b8670004-0c98-43c0-8886-28c1551b6935%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I have the same problem after upgrading to ES 1.4.2. How did you solve it?

Br
Mathias

Den torsdag 11 december 2014 kl. 14:09:18 UTC+1 skrev Erick Blanchard:

Hello All,
First thanks a lotfor the great work on the ELK stack!

This post is both about elasticsearch and kibana3. There is something I
dont get in the breaking change changelog of 1.4 about alias api:

« The get alias api will return a section for aliases even if there are no
aliases. This ensures that the following two examples are equivalent:
curl -XGET 'http://localhost:9200/_all/_aliases'
curl -XGET 'http://localhost:9200/_aliases' »

The behaviour I had with 1.2.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
will return a json that list all indices in the cluster even when no
alias. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-pouet" : { <- non aliased index
"aliases" : { }
},

"blabla-prout" : { <- aliased index
"aliases" : {
"blabla-yeah" : { }
}
},

}

The behaviour I get with 1.4.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
shows only the indices that do have at least one alias. When no alias it
shows nothing. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-prout" : { <- aliased index only
"aliases" : {
"blabla-yeah" : { }
}
}
}

To me it seems the change is rather: 1.4 no longer show indices that don't
have aliases in the /_all/_aliases, but as a non excellent english speaker
I may misunderstand it.

The scond thing is I have the impression that it breaks my kibana3 setup
as when loading a dashboard, I can see kibana send a query for
http://es-api-endpoint>:9200//_aliases?ignore_unavailable=true&ignore_missing=true
and since 1.4 this results in an empty list. After that kibana only sohw a
warning about 'there is no index that match your query'

I am able to work around by adding a dummy alias to all the indices. This
allow the aforementionned call from kibana3 to succeed and data is
displayed. I post this here as I dont really know if it belongs to
elasticsearch or kibana3, and if someone had the same problem and have a
better solution,please say it!

Thanks & have a nice day!
Erick

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/16126d65-b8fb-44c0-b5a5-7e2a4e6d2b7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Mathias,

sorry for the delay, as mentioned in the above message, I workaround by
adding a daily cron script that create an alias for each index with

curl -XPOST "${api_endpoint}/_aliases" -d "{"actions" : [ { "add" : {
"index" : "${index}", "alias" : "${index}_dummy" } } ]}"

regards.
Erick

Le vendredi 20 mars 2015 00:00:22 UTC+1, Mathias Adler a écrit :

I have the same problem after upgrading to ES 1.4.2. How did you solve it?

Br
Mathias

Den torsdag 11 december 2014 kl. 14:09:18 UTC+1 skrev Erick Blanchard:

Hello All,
First thanks a lotfor the great work on the ELK stack!

This post is both about elasticsearch and kibana3. There is something I
dont get in the breaking change changelog of 1.4 about alias api:

« The get alias api will return a section for aliases even if there are
no aliases. This ensures that the following two examples are equivalent:
curl -XGET 'http://localhost:9200/_all/_aliases'
curl -XGET 'http://localhost:9200/_aliases' »

The behaviour I had with 1.2.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
will return a json that list all indices in the cluster even when no
alias. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-pouet" : { <- non aliased index
"aliases" : { }
},

"blabla-prout" : { <- aliased index
"aliases" : {
"blabla-yeah" : { }
}
},

}

The behaviour I get with 1.4.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
shows only the indices that do have at least one alias. When no alias it
shows nothing. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-prout" : { <- aliased index only
"aliases" : {
"blabla-yeah" : { }
}
}
}

To me it seems the change is rather: 1.4 no longer show indices that
don't have aliases in the /_all/_aliases, but as a non excellent english
speaker I may misunderstand it.

The scond thing is I have the impression that it breaks my kibana3 setup
as when loading a dashboard, I can see kibana send a query for
http://es-api-endpoint>:9200//_aliases?ignore_unavailable=true&ignore_missing=true
and since 1.4 this results in an empty list. After that kibana only sohw a
warning about 'there is no index that match your query'

I am able to work around by adding a dummy alias to all the indices. This
allow the aforementionned call from kibana3 to succeed and data is
displayed. I post this here as I dont really know if it belongs to
elasticsearch or kibana3, and if someone had the same problem and have a
better solution,please say it!

Thanks & have a nice day!
Erick

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f7b0df65-f0cf-4f4f-ac67-855800c29496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks for your reply Erick,
I had exactly the same problem after upgrade as you described.
But the solution for my problem was the oldest trick in the book. After
rebooting all servers in the cluster the alias problem went a way and all
works as normal...!

Br
Mathias

2015-03-30 9:27 GMT+02:00 Erick Blanchard erick.blanchard@gmail.com:

Hello Mathias,

sorry for the delay, as mentioned in the above message, I workaround by
adding a daily cron script that create an alias for each index with

curl -XPOST "${api_endpoint}/_aliases" -d "{"actions" : [ { "add" : {
"index" : "${index}", "alias" : "${index}_dummy" } } ]}"

regards.
Erick

Le vendredi 20 mars 2015 00:00:22 UTC+1, Mathias Adler a écrit :

I have the same problem after upgrading to ES 1.4.2. How did you solve it?

Br
Mathias

Den torsdag 11 december 2014 kl. 14:09:18 UTC+1 skrev Erick Blanchard:

Hello All,
First thanks a lotfor the great work on the ELK stack!

This post is both about elasticsearch and kibana3. There is something I
dont get in the breaking change changelog of 1.4 about alias api:

« The get alias api will return a section for aliases even if there are
no aliases. This ensures that the following two examples are equivalent:
curl -XGET 'http://localhost:9200/_all/_aliases'
curl -XGET 'http://localhost:9200/_aliases' »

The behaviour I had with 1.2.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
will return a json that list all indices in the cluster even when no
alias. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-pouet" : { <- non aliased index
"aliases" : { }
},

"blabla-prout" : { <- aliased index
"aliases" : {
"blabla-yeah" : { }
}
},

}

The behaviour I get with 1.4.1 is
curl -XGET 'http://localhost:9200/_all/_aliases'
shows only the indices that do have at least one alias. When no alias it
shows nothing. Like :

curl 'localhost:9200/_all/_aliases?pretty'

{
"blabla-prout" : { <- aliased index only
"aliases" : {
"blabla-yeah" : { }
}
}
}

To me it seems the change is rather: 1.4 no longer show indices that
don't have aliases in the /_all/_aliases, but as a non excellent english
speaker I may misunderstand it.

The scond thing is I have the impression that it breaks my kibana3 setup
as when loading a dashboard, I can see kibana send a query for
http://es-api-endpoint>:9200//_
aliases?ignore_unavailable=true&ignore_missing=true and since 1.4 this
results in an empty list. After that kibana only sohw a warning about
'there is no index that match your query'

I am able to work around by adding a dummy alias to all the indices.
This allow the aforementionned call from kibana3 to succeed and data is
displayed. I post this here as I dont really know if it belongs to
elasticsearch or kibana3, and if someone had the same problem and have a
better solution,please say it!

Thanks & have a nice day!
Erick

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/-MQsuJQWqYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f7b0df65-f0cf-4f4f-ac67-855800c29496%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f7b0df65-f0cf-4f4f-ac67-855800c29496%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMEpsta1cwJ%2BfwNe%3D2SQBV67H%3D475QwVoP6jiq5WTiOMcVRNvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.