Documentation ¶
Index ¶
Constants ¶
const ( IntakeEndpointV1 = "/intake/" SeriesEndpointV1 = "/api/v1/series" CheckRunsEndpointV1 = "/api/v1/check_run" SketchSeriesEndpointV1 = "/api/v1/sketches" ValidateEndpointV1 = "/api/v1/validate" ProcessesEndpointV1 = "/api/v1/collector" ContainerEndpointV1 = "/api/v1/container" OrchestratorEndpointV1 = "/api/v1/orchestrator" SeriesEndpointV2 = "/api/v2/series" EventsEndpointV2 = "/api/v2/events" ServiceChecksEndpointV2 = "/api/v2/service_checks" SketchSeriesEndpointV2 = "/api/beta/sketches" HostMetadataEndpointV2 = "/api/v2/host_metadata" MetadataEndpointV2 = "/api/v2/metadata" )
Endpoint name constants
Variables ¶
This section is empty.
Functions ¶
func GetV1Endpoints ¶
func GetV1Endpoints() []string
GetV1Endpoints returns a slice containing all the v1 endpoints
Types ¶
type HostMeta ¶
type HostMeta struct { APIKey string AgentVersion string UUID string InternalHostname string Os string AgentFlavor string `json:"agent-flavor"` Python string SystemStats struct { CPUCores int Machine string Platform string PythonV string Processor string MacV interface{} NixV interface{} FsdV interface{} WinV interface{} } Meta struct { SocketHostname string `json:"socket-hostname"` Timezones []string SocketFqdn string `json:"socket-fqdn"` Ec2Hostname string `json:"ec2-hostname"` Hostname string HostAliases []string `json:"host_aliases"` InstanceID string `json:"instance-id"` } HostTags struct { System []string `json:"system"` GoogleCloudPlatform []string `json:"google cloud platform,omitempty"` } `json:"host-tags"` Network struct { IP string `json:"ipaddress"` IPV6 string `json:"ipaddressv6"` Mac string `json:"macaddress"` } Logs struct{ Transport string } Resources struct { Processes struct { Snaps []interface{} } } }
HostMeta represents a metadata payload
func DecodeHostMeta ¶
DecodeHostMeta decodes a HostMeta payload
func (*HostMeta) GetProcessSnapshots ¶
func (hm *HostMeta) GetProcessSnapshots() []*ProcessSnapshot
GetProcessSnapshots extracts the list of processes from the metadata payload
type Process ¶
type Process struct { Username string CPUPct float64 MemPct float64 VMS float64 RSS float64 Name string Pids float64 }
Process represent a process stats
type ProcessSnapshot ¶
ProcessSnapshot represents a list of snapshots
func NewProcessSnapshot ¶
func NewProcessSnapshot(rawSnapshot interface{}) *ProcessSnapshot
NewProcessSnapshot creates a ProcessSnapshot from raw data.
The payload is a slice in the form [timestamp, process_list] where process_list is in turn an array of 5 items.
type PubSub ¶
PubSub is a ridicoulously simple message broker
var ( // MsgBroker is used to read messages from the intake MsgBroker *PubSub )
func (*PubSub) Close ¶
func (ps *PubSub) Close()
Close shuts down the broker and cleans up the channels
type V1Metric ¶
type V1Metric struct { Metric string Points []Point Tags []string Host string Device string Type string Interval int SourceTypeName string `json:"source_type_name"` }
V1Metric represents a datapoint series
func DecodeV1Metrics ¶
DecodeV1Metrics decodes a payload and returns a slice of Metric