Skip to content

alcrishub/humiex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Humiex

This code was brought to you by BlockFi, the best way to earn on crypto and grow your wealth.

Humio searches using it's REST API Supports sync queries and streaming live queries

TODO: Installation

Usage

Create a Humio Client

client = Humiex.Client.new("my-humio-host.com", "my_repo", "my_token")

Query

  start = "1s"
  query_string = "#env=dev #type=log foo" # Search all logs in the last second on dev environment that have "foo"
 {:ok, events, state} = Humiex.query(client, query_string, start)

To only get the events:

  start = "1s"
  query_string = "#env=dev #type=log foo"
 events = Humiex.query_values(client, query_string, start)

Stream

Turn it into a live query:

  start = "1s"
  query_string = "#env=dev #type=log foo"
  event_stream = Humiex.stream_values(client, query_string, start)
  last_10_events = event_stream
  |> Enum.take(10)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%