yassine

yassine

Query ES with Httpoison

when i use the DevTools in ElasticSearch, to get logs from a POD :

it’s gives me about 310 lines:

but when i did that inside of my elixir application:

logs = HTTPoison.get("https://x.x.x.x:9200/lo*/_search?q=kubernetes.pod_name:logs-dep-test-7469c67667-fcrzh", hackney: [:insecure, basic_auth: {"xxxx", "xxxxx"}])

it’s gives me inacomplet response ( just maybe 150lines )
can anyone gives me some ideas please !

Most Liked

karlosmid

karlosmid

Hi!

How did you check logs value? If you did IO.inspect and observed output in terminal, note that IO.inspect truncates output.

Last Post!

yassine

yassine

i solved that problem by 2 things:

  • first: i was in need to use a way called async requests and get all the informations by chunks
  • second: in elixir and with the inspect method you can pass an option called “infinity” when you deal wtih large information to display

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement