splunkServer

fun splunkServer(hecUrl: String, hecToken: String, checkCertificate: Boolean = true): SendString

Creates a SendString function that sends an event string to a Splunk server using the HTTP Event Collector (HEC) API.

Return

A function that takes a string event and asynchronously sends it to the Splunk server.

Parameters

hecUrl

The URL of the Splunk HEC endpoint.

hecToken

The token used for authentication with the Splunk HEC.

checkCertificate

Specifies whether to check the SSL certificate when making the HTTP request. Defaults to true.