View Source TelemetryMetricsSplunk.Hec.Api (TelemetryMetricsSplunk v0.0.5-alpha)
Sends metrics to the Splunk HTTP Event Collector (HEC).
alias TelemetryMetricsSplunk.Hec.Api
measurements = %{
"vm.memory.total.summary" => 500
}
options = [
finch: MyFinch,
index: "main",
token: "00000000-0000-0000-0000-000000000000",
url: "https://example.splunkcloud.com:8088/services/collector"
]
metadata = %{
"server" => "alpha"
}
Api.send(measurements, options, metadata)
NOTE Metadata is optional and gets sent as dimensions.
Summary
Functions
Sends metrics to the Splunk HTTP Event Collector (HEC).
Types
@type options() :: [ finch: Finch.name() | nil, index: String.t() | nil, token: String.t() | nil, url: String.t() | nil ]
Functions
Sends metrics to the Splunk HTTP Event Collector (HEC).
If finch
, token
, or url
are nil
, the function will log the info and not send the metrics.
If index
is set to nil
, no index will be sent and Splunk will use the Token's default.