warpex v1.1.0 Warpex
Documentation for Warpex.
Usage
Add it to your applications and dependencies in mix.exs
:
def application do
[applications: [:warpex]]
end
def deps do
[{:warpex, "~> 1.0"}]
end
Configure it in config.exs
:
config :warpex,
address: "http://localhost", # defaults to System.get_env("WARP10_ADDRESS"),
read_key: "xxxxx", # defaults to System.get_env("WARP10_READ_KEY")
write_key: "xxxxx", # defaults to System.get_env("WARP10_WRITE_KEY")
httpoison_opts: [timeout: 5000] # defaults to []
And then call functions like:
{status, response} = Warpex.update([%{"labels" => "label1=anything", "name" => "metric.1.memory_available", "val" => 12, "ts" => 1521969018754000}])
status
is either :ok
or :error
.
response
is the raw response from Warp10 as text
Link to this section Summary
Link to this section Functions
Link to this function
fetch(selector, start, stop)
Link to this function
parse_result(data)
Link to this function
update(data)