A CIF instance where ES has grown to 365 shards and is on a spinning disk. When ES or the box is restarted, it takes several minutes for ES to initialize itself. During that time the health check status is "red".
it would be nice if cif-router would check for this and pass at along to the client. as it stands now the user sees this:
cif -q example.com -d
[2016-02-24T09:55:24,443Z][INFO][main:268]: starting up client...
[2016-02-24T09:55:24,443Z][INFO][main:303]: running search...
[2016-02-24T09:55:24,443Z][DEBUG][CIF::SDK::Client:170]: uri created: https://localhost/observables?gzip=1&observable=example.com
[2016-02-24T09:55:24,443Z][DEBUG][CIF::SDK::Client:171]: making request...
[2016-02-24T09:55:54,737Z][INFO][CIF::SDK::Client:175]: status: 422
[2016-02-24T09:55:54,738Z][INFO][CIF::SDK::Client:181]: response size: < 1MB
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:184]: decoding content..
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:187]: decompressing...
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:193]: Data input to gunzip is not in gzip format at /usr/local/share/perl/5.18.2/CIF/SDK/Client.pm line 189.
invalid request at /usr/local/bin/cif line 310.
status 422 & "invalid request"
you could imagine a better response from the CIF API:
cif -q example.com -d
[2016-02-24T09:55:24,443Z][INFO][main:268]: starting up client...
[2016-02-24T09:55:24,443Z][INFO][main:303]: running search...
[2016-02-24T09:55:24,443Z][DEBUG][CIF::SDK::Client:170]: uri created: https://localhost/observables?gzip=1&observable=example.com
[2016-02-24T09:55:24,443Z][DEBUG][CIF::SDK::Client:171]: making request...
[2016-02-24T09:55:54,737Z][INFO][CIF::SDK::Client:175]: status: 503 OR 504
[2016-02-24T09:55:54,738Z][INFO][CIF::SDK::Client:181]: response size: < 1MB
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:184]: decoding content..
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:187]: decompressing...
[2016-02-24T09:55:54,738Z][DEBUG][CIF::SDK::Client:193]: Data input to gunzip is not in gzip format at /usr/local/share/perl/5.18.2/CIF/SDK/Client.pm line 189.
Error: The ElasticSearch cluster is reporting a status of "Red", investigate the health status of the ElasticSearch cluster.
Scenario:
A CIF instance where ES has grown to 365 shards and is on a spinning disk. When ES or the box is restarted, it takes several minutes for ES to initialize itself. During that time the health check status is "red".
it would be nice if cif-router would check for this and pass at along to the client. as it stands now the user sees this:
status 422 & "invalid request"
you could imagine a better response from the CIF API: