splunk

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SFxAccessTokenHeader  = "X-Sf-Token"
	SFxAccessTokenLabel   = "com.splunk.signalfx.access_token"
	SFxEventCategoryKey   = "com.splunk.signalfx.event_category"
	SFxEventPropertiesKey = "com.splunk.signalfx.event_properties"
	SourcetypeLabel       = "com.splunk.sourcetype"
	SplunkHECTokenHeader  = "Splunk"
	SplunkHecTokenLabel   = "com.splunk.hec.access_token"
	// HecEventMetricType is the type of HEC event. Set to metric, as per https://docs.splunk.com/Documentation/Splunk/8.0.3/Metrics/GetMetricsInOther.
	HecEventMetricType = "metric"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenPassthroughConfig

type AccessTokenPassthroughConfig struct {
	// AccessTokenPassthrough indicates whether to associate datapoints with an organization access token received in request.
	AccessTokenPassthrough bool `mapstructure:"access_token_passthrough"`
}

AccessTokenPassthroughConfig configures passing through access tokens.

type Event added in v0.13.0

type Event struct {
	Time       float64                `json:"time"`                 // epoch time
	Host       string                 `json:"host"`                 // hostname
	Source     string                 `json:"source,omitempty"`     // optional description of the source of the event; typically the app's name
	SourceType string                 `json:"sourcetype,omitempty"` // optional name of a Splunk parsing configuration; this is usually inferred by Splunk
	Index      string                 `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
	Event      interface{}            `json:"event"`                // type of event: set to "metric" or nil if the event represents a metric, or is the payload of the event.
	Fields     map[string]interface{} `json:"fields,omitempty"`     // dimensions and metric data
}

Event represents a metric in Splunk HEC format

func (Event) GetMetricValues added in v0.13.0

func (m Event) GetMetricValues() map[string]interface{}

GetMetricValues extracts metric key value pairs from a Splunk HEC metric.

func (Event) IsMetric added in v0.13.0

func (m Event) IsMetric() bool

IsMetric returns true if the Splunk event is a metric.

type HostID added in v0.12.0

type HostID struct {
	// Key is the key name/type.
	Key HostIDKey
	// Value is the unique ID.
	ID string
}

HostID is a unique key and value (usually used as a dimension) to uniquely identify a host using metadata about a cloud instance.

func ResourceToHostID added in v0.12.0

func ResourceToHostID(res pdata.Resource) (HostID, bool)

ResourceToHostID returns a boolean determining whether or not a HostID was able to be computed or not.

type HostIDKey added in v0.12.0

type HostIDKey string

HostIDKey represents a host identifier.

const (
	// AWS
	HostIDKeyAWS HostIDKey = "AWSUniqueId"
	// GCP
	HostIDKeyGCP HostIDKey = "gcp_id"
	// Host
	HostIDKeyHost HostIDKey = conventions.AttributeHostName
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL