You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sourcestring`json:"source" binding:"required"`// app name
19
-
SourceTypestring`json:"sourcetype" binding:"required"`// Splunk bucket to group logs in
20
-
Indexstring`json:"index" binding:"required"`// idk what it does..
21
-
Eventinterface{} `json:"event" binding:"required"`// throw any useful key/val pairs here
17
+
Timeint64`json:"time"`// epoch time in seconds
18
+
Hoststring`json:"host"`// hostname
19
+
Sourcestring`json:"source,omitempty"`// optional description of the source of the event; typically the app's name
20
+
SourceTypestring`json:"sourcetype,omitempty"`// optional name of a Splunk parsing configuration; this is usually inferred by Splunk
21
+
Indexstring`json:"index,omitempty"`// optional name of the Splunk index to store the event in; not required if the token has a default index set in Splunk
22
+
Eventinterface{} `json:"event"`// throw any useful key/val pairs here
22
23
}
23
24
24
25
// Client manages communication with Splunk's HTTP Event Collector.
25
26
// New client objects should be created using the NewClient function.
26
27
//
27
28
// The URL field must be defined and pointed at a Splunk servers Event Collector port (i.e. https://{your-splunk-URL}:8088/services/collector).
28
29
// The Token field must be defined with your access token to the Event Collector.
29
-
// The Source, SourceType, and Index fields must be defined.
30
30
typeClientstruct {
31
31
HTTPClient*http.Client// HTTP client used to communicate with the API
0 commit comments