Telegraf client.
Checkout the documentation for more information.
The package can be installed by adding telegraf
to your list of dependencies in mix.exs
:
def deps do
[
{:telegraf, "~> 0.1.1"}
]
end
- Add
Telegraf
to your supervision tree:
{Telegraf, name: MyTelegraf}
- Send the metric:
metric = %Telegraf.Metric{
name: "weather",
tag_set: %{location: "us-midwest"},
field_set: %{temperature: 82},
timestamp: System.os_time()
}
Telegraf.send(MyTelegraf, metric)
See the changelog.
See the contributing file.
Copyright 2021 (c) Finbits.
telegraf-elixir source code is released under Apache 2 License.
Check LICENSE file for more information.