# Elastic 6.x http status code on IP:9200

**URL:** <https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904>\
**Category:** Elasticsearch\
**Created:** [November 15, 2018, 4:12pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904 "2018-11-15T16:12:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 15, 2018, 4:12pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/1 "2018-11-15T16:12:25Z")

</div>

Hi

With 1.7.2, IP:9200 gives me:

> {  
> "status" : **200** ,  
> "name" : "node\_name",  
> "cluster\_name" : "cluster\_name",  
> "version" : {  
> "number" : "1.7.2",  
> "build\_hash" : "e43676b1385b8125d647f593f7202acbd816e8ec",  
> "build\_timestamp" : "2015-09-14T09:49:53Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "4.10.4"  
> },  
> "tagline" : "You Know, for Search"  
> }

With 6.x, I get:

> {  
> "name" : "node\_name",  
> "cluster\_name" : "cluster\_name",  
> "cluster\_uuid" : "XagsK7MmT1CghWS9SrKQUg",  
> "version" : {  
> "number" : "6.5.0",  
> "build\_flavor" : "default",  
> "build\_type" : "rpm",  
> "build\_hash" : "816e6f6",  
> "build\_date" : "2018-11-09T18:58:36.352602Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "7.5.0",  
> "minimum\_wire\_compatibility\_version" : "5.6.0",  
> "minimum\_index\_compatibility\_version" : "5.0.0"  
> },  
> "tagline" : "You Know, for Search"  
> }

There is no **status** anymore.  
In 1.7.2 version, our http monitor monitors it with the following regex

> \[1\][0-9][0-9]$

Question is, how should I do this on 6.x..?  
Aren't there status codes anymore..? _(at least the current regex does not work any more)_

Regards  
Raul

* * *

1. 234

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 15, 2018, 4:17pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/2 "2018-11-15T16:17:52Z")

</div>

You might be able to instead use the `_cluster/health` endpoint. This contains a status, but is possibly a bit more expensive.

---

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 15, 2018, 4:31pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/3 "2018-11-15T16:31:15Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> `_cluster/health`

Well, this status: "green" is actually not what I am looking for.

I have 2 nodes.  
I have defined a single gslb name for these IP's, but since all the requests are handled by first node (primary/backup), I would like to know if first node is offline for some reason. If that happens, then his service is automatically redirected to the node 2.

This \_cluster/health is for whole cluster, and since if status="yellow", I do not know, which node has problems.

Regards  
Raul

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 15, 2018, 4:44pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/4 "2018-11-15T16:44:57Z")

</div>

If you only have two nodes in the cluster, losing either of the nodes should make the cluster red (assuming you have 2 master eligible nodes and have configured it correctly). Why can't you simply establish the status of the cluster and nodes through a call to another API if there is an issue?

---

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 15, 2018, 5:39pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/5 "2018-11-15T17:39:11Z")

</div>

I am not sure, what you mean by that:

> Why can't you simply establish the status of the cluster and nodes through a call to another API if there is an issue?

I have 1 master eligble node, bear in mind, this is development environment.

Regards  
Raul

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 15, 2018, 5:49pm UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/6 "2018-11-15T17:49:08Z")

</div>

OK, so the cluster would only go red if the master node went down and otherwise be green or yellow. By other API I meant e.g. `_cat/nodes`.

---

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 16, 2018, 9:53am UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/7 "2018-11-16T09:53:45Z")

</div>

Ok, I figured out, HTTP code is actually 200 as well.  
Problem was, that I had firewall issue..😃

curl -i [http://IP:9200/](http://IP:9200/)

> HTTP/1.1 403 Forbidden  
> Content-Type: text/html  
> Cache-Control: no-cache  
> Content-Length: 1393

After this got sorted out.

curl -i [http://IP:9200/](http://IP:9200/)

> HTTP/1.1 200 OK  
> content-type: application/json; charset=UTF-8  
> content-length: 505
> 
> {  
> "name" : "node\_name",  
> "cluster\_name" : "cluster\_name",  
> "cluster\_uuid" : "XagsK7MmT1CghWS9SrKQUg",  
> "version" : {  
> "number" : "6.5.0",  
> "build\_flavor" : "default",  
> "build\_type" : "rpm",  
> "build\_hash" : "816e6f6",  
> "build\_date" : "2018-11-09T18:58:36.352602Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "7.5.0",  
> "minimum\_wire\_compatibility\_version" : "5.6.0",  
> "minimum\_index\_compatibility\_version" : "5.0.0"  
> },  
> "tagline" : "You Know, for Search"  
> }

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 14, 2018, 9:53am UTC](https://discuss.elastic.co/t/elastic-6-x-http-status-code-on-ip-9200/156904/8 "2018-12-14T09:53:49Z")

</div>

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