splunk

package
v0.0.0-...-1965ecc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIField

type APIField struct {
	Name string `json:"name"`
}

type DataIndex

type DataIndex struct {
	ID      client.ID              `selective:"create" service:"data/indexes"`
	Content map[string]interface{} `json:"content"`
}

DataIndex https://docs.splunk.com/Documentation/Splunk/9.2.1/RESTREF/RESTintrospect#data.2Findexes

type FeatureHealth

type FeatureHealth struct {
	Health   string                   `json:"health"`
	Disabled bool                     `json:"disabled"` // if true, health is not relevant
	Features map[string]FeatureHealth `json:"features"`
}

type HealthDeploymentDetails

type HealthDeploymentDetails struct {
	ID      client.ID                      `selective:"create" service:"server/health/deployment/details"`
	Content HealthDeploymentDetailsContent `json:"content"`
}

type HealthDeploymentDetailsContent

type HealthDeploymentDetailsContent struct {
	Features map[string]interface{} `json:"features"`
	Health   string                 `json:"health"`
	Disabled bool                   `json:"disabled"`
}

type HealthSplunkdDetails

type HealthSplunkdDetails struct {
	ID      client.ID     `selective:"create" service:"server/health/splunkd/details"`
	Content FeatureHealth `json:"content"`
}

type MetricMeasure

type MetricMeasure struct {
	Value  float64
	Labels map[string]string
}

type SearchAPIResult

type SearchAPIResult struct {
	Results     []map[string]string `json:"results"`
	Fields      []APIField          `json:"fields"`
	Preview     bool                `json:"preview"`
	InitOffset  int                 `json:"init_offset"`
	Messages    []interface{}       `json:"messages"`
	Highlighted interface{}         `json:"highlighted"`
}

type ServerIntrospectionIndexer

type ServerIntrospectionIndexer struct {
	ID      client.ID                         `selective:"create" service:"server/introspection/indexer"`
	Content ServerIntrospectionIndexerContent `json:"content"`
}

ServerIntrospectionIndexer https://docs.splunk.com/Documentation/Splunk/9.2.1/RESTREF/RESTintrospect#server.2Fintrospection.2Findexer

type ServerIntrospectionIndexerContent

type ServerIntrospectionIndexerContent struct {
	AverageKBps float64 `json:"average_KBps"` // Average indexer throughput (kbps).
	Reason      string  `json:"reason"`       // Status explanation. For a normal status, returns `.` . The following examples show possible abnormal status reasons.
	Status      string  `json:"status"`       // Current indexer status. One of the following values. normal, throttled, stopped
}

type Splunk

type Splunk struct {
	Client *splunkclient.Client
	Logger log.Logger
}

func (*Splunk) GetDimensions

func (s *Splunk) GetDimensions(index string, metric string) []string

GetDimensions returns the dimensions by alphabetical order for one metric it will return nil if no dimension exists

func (*Splunk) GetMetricValues

func (s *Splunk) GetMetricValues(index string, metric string, callback func(measure MetricMeasure) error) error

GetMetricValues retrieves all latest values for one metric on Splunk callback will be called on each measure errors on callback will be logged, and processing will continue

Jump to

Keyboard shortcuts

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