Documentation ¶
Index ¶
- Constants
- Variables
- func Get(targetURL string, params map[string]string, authHeader string) ([]byte, error)
- func GetBasicAuthHeader(clientID, clientSecret string) string
- func GetCredentials(novaUrl string) (clientID, clientSecret string, err error)
- func GetUserAgent() string
- func ParseSearchResults(results []byte) (jsonBytes []byte, err error)
- func Post(targetURL string, payload io.Reader, authHeader string) ([]byte, error)
- func SaveCredentials(novaUrl string) (clientID, clientSecret string, err error)
- type MetricsLSResponse
- type NovaIncomingEventNonReporting
- type NovaIncomingEventReporting
- type NovaIngest
- type NovaMetricsSearch
- type NovaOutgoingEventFormat
- type NovaSearch
- type NovaSearchEventsQuery
- type NovaSearchResponse
- type NovaSearchStatsQuery
- type StrMatrix
Constants ¶
View Source
const ( EventIngestor = iota MetricIngestor = iota )
View Source
const AppVersion = "0.4.0"
View Source
const DefaultNovaURL = "https://api.splunknova.com"
Variables ¶
View Source
var HTTPClient *http.Client
Functions ¶
func GetBasicAuthHeader ¶
func GetCredentials ¶
func GetUserAgent ¶
func GetUserAgent() string
func ParseSearchResults ¶ added in v0.4.0
func SaveCredentials ¶
Types ¶
type MetricsLSResponse ¶
type MetricsLSResponse struct {
Metrics []string `json:"metrics"`
}
type NovaIncomingEventNonReporting ¶ added in v0.4.0
type NovaIncomingEventReporting ¶ added in v0.4.0
type NovaIngest ¶
type NovaIngest struct { Source string Entity string Auth string NovaURL string ErrChan chan error Type int }
NovaIngest creates a new ingest obj
func NewNovaIngestForEvents ¶
func NewNovaIngestForEvents(novaURL, entity, auth string) *NovaIngest
func NewNovaIngestForMetrics ¶
func NewNovaIngestForMetrics(novaURL, entity, auth string) *NovaIngest
func (*NovaIngest) Start ¶
func (n *NovaIngest) Start(r io.Reader)
Start sends lines from stdin to nova
func (*NovaIngest) WaitAndLogErrors ¶
func (n *NovaIngest) WaitAndLogErrors() (errorsEncountered bool)
WaitAndLogErrors blocks on the pipeline to complete and logs all errors
type NovaMetricsSearch ¶
func NewNovaMetricsSearch ¶
func NewNovaMetricsSearch(novaURL, auth string) *NovaMetricsSearch
NewNovaSearch creates a new search obj
func (*NovaMetricsSearch) GetLs ¶
func (n *NovaMetricsSearch) GetLs() (StrMatrix, error)
func (*NovaMetricsSearch) GetStats ¶ added in v0.4.0
func (n *NovaMetricsSearch) GetStats(metric_names, stats, groupBy []string, span string) (data StrMatrix, err error)
func (*NovaMetricsSearch) WaitAndLogErrors ¶
func (n *NovaMetricsSearch) WaitAndLogErrors() (errorsEncountered bool)
WaitAndLogErrors blocks on the pipeline to complete and logs all errors
type NovaOutgoingEventFormat ¶ added in v0.4.0
type NovaSearch ¶
func NewNovaSearch ¶
func NewNovaSearch(novaURL, auth string) *NovaSearch
NewNovaSearch creates a new search obj
func (*NovaSearch) Search ¶
func (n *NovaSearch) Search(searchTerms, transforms, report string) (data StrMatrix)
func (*NovaSearch) WaitAndLogErrors ¶
func (n *NovaSearch) WaitAndLogErrors() (errorsEncountered bool)
WaitAndLogErrors blocks on the pipeline to complete and logs all errors
type NovaSearchEventsQuery ¶ added in v0.4.0
type NovaSearchResponse ¶ added in v0.4.0
type NovaSearchResponse struct { Errors []string `json:"errors"` Items []interface{} `json:"items"` Job struct { SearchID string `json:"search_id"` SearchClass string `json:"search_class"` Status string `json:"status"` } `json:"job"` Metadata struct { Count int `json:"count"` Offset int `json:"offset"` TotalCount int `json:"total_count"` } `json:"metadata"` }
type NovaSearchStatsQuery ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.