splunknozzle

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiEndpoint  string `json:"api-endpoint"`
	User         string `json:"-"`
	Password     string `json:"-"`
	ClientID     string `json:"-"`
	ClientSecret string `json:"-"`

	SplunkToken        string `json:"-"`
	SplunkHost         string `json:"splunk-host"`
	SplunkIndex        string `json:"splunk-index"`
	SplunkLoggingIndex string `json:"splunk-logging-index"`

	JobHost string `json:"job-host"`

	SkipSSLCF      bool          `json:"skip-ssl-cf"`
	SkipSSLSplunk  bool          `json:"skip-ssl-splunk"`
	SubscriptionID string        `json:"subscription-id"`
	KeepAlive      time.Duration `json:"keep-alive"`

	AddAppInfo         string        `json:"add-app-info"`
	IgnoreMissingApps  bool          `json:"ignore-missing-apps"`
	MissingAppCacheTTL time.Duration `json:"missing-app-cache-ttl"`
	AppCacheTTL        time.Duration `json:"app-cache-ttl"`
	OrgSpaceCacheTTL   time.Duration `json:"org-space-cache-ttl"`
	AppLimits          int           `json:"app-limits"`
	AddTags            bool          `json:"add-tags"`

	BoltDBPath   string `json:"boltdb-path"`
	WantedEvents string `json:"wanted-events"`
	ExtraFields  string `json:"extra-fields"`

	FlushInterval           time.Duration `json:"flush-interval"`
	QueueSize               int           `json:"queue-size"`
	BatchSize               int           `json:"batch-size"`
	Retries                 int           `json:"retries"`
	HecWorkers              int           `json:"hec-workers"`
	RefreshSplunkConnection bool          `json:"refresh-splunk-connection"`
	KeepAliveTimer          time.Duration `json:"keep-alive-timer"`

	Version string `json:"version"`
	Branch  string `json:"branch"`
	Commit  string `json:"commit"`
	BuildOS string `json:"buildos"`

	TraceLogging              bool          `json:"trace-logging"`
	Debug                     bool          `json:"debug"`
	StatusMonitorInterval     time.Duration `json:"mem-queue-monitor-interval"`
	SelectedMonitoringMetrics string        `json:"selected-monitoring-metrics"`
	SplunkMetricIndex         string        `json:"splunk-metric-index"`
}

func NewConfigFromCmdFlags

func NewConfigFromCmdFlags(version, branch, commit, buildos string) *Config

func (*Config) ToMap

func (c *Config) ToMap() map[string]interface{}

type SplunkFirehoseNozzle

type SplunkFirehoseNozzle struct {
	// contains filtered or unexported fields
}

func NewSplunkFirehoseNozzle

func NewSplunkFirehoseNozzle(config *Config, logger lager.Logger) *SplunkFirehoseNozzle

create new function of type *SplunkFirehoseNozzle

func (*SplunkFirehoseNozzle) AppCache

func (s *SplunkFirehoseNozzle) AppCache(client cache.AppClient) (cache.Cache, error)

AppCache creates in-memory cache or boltDB cache

func (*SplunkFirehoseNozzle) EventRouter

func (s *SplunkFirehoseNozzle) EventRouter(cache cache.Cache, eventSink eventsink.Sink) (eventrouter.Router, error)

EventRouter creates EventRouter object and setup routes for interested events

func (*SplunkFirehoseNozzle) EventSink

func (s *SplunkFirehoseNozzle) EventSink(cache cache.Cache) (eventsink.Sink, error)

EventSink creates std sink or Splunk sink

func (*SplunkFirehoseNozzle) EventSource

func (s *SplunkFirehoseNozzle) EventSource(pcfClient *cfclient.Client) *eventsource.Firehose

EventSource creates eventsource.Source object which can read events from

func (*SplunkFirehoseNozzle) Metric added in v1.3.0

func (*SplunkFirehoseNozzle) Nozzle

func (s *SplunkFirehoseNozzle) Nozzle(eventSource eventsource.Source, eventRouter eventrouter.Router) *nozzle.Nozzle

Nozzle creates a Nozzle object which glues the event source and event router

func (*SplunkFirehoseNozzle) PCFClient

func (s *SplunkFirehoseNozzle) PCFClient() (*cfclient.Client, error)

CFClient creates a client object which can talk to Cloud Foundry

func (*SplunkFirehoseNozzle) Run

func (s *SplunkFirehoseNozzle) Run(shutdownChan chan os.Signal) error

Run creates all necessary objects, reading events from CF firehose and sending to target Splunk index It runs forever until something goes wrong

Jump to

Keyboard shortcuts

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