Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetNetworkList(FetchVlans bool) (NetworkList, error)
- func (c *Client) GetVlanList(NetworkId int64, l *VlanList) error
- func (c *Client) KeyedMetricQuery(cycle, category, objectType string, fromMS, untilMS int64, ...) (MetricResponseKeyed, error)
- func (c *Client) SimpleMetricQuery(cycle, category, objectType string, fromMS, untilMS int64, ...) (MetricResponseSimple, error)
- type ExtraHopMetric
- type KeyPair
- type MetricQuery
- type MetricResponseBase
- type MetricResponseKeyed
- type MetricResponseSimple
- type MetricSpec
- type MetricStat
- type MetricStatKeyed
- type MetricStatSimple
- type NetworkList
- type VlanList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CycleAuto = "auto" Cycle30Sec = "30sec" Cycle5Min = "5min" Cycle1Hr = "1hr" Cycle24Hr = "24hr" )
Posible Values for the Cycle Parameter of a Metric Query
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetNetworkList ¶
func (c *Client) GetNetworkList(FetchVlans bool) (NetworkList, error)
func (*Client) KeyedMetricQuery ¶
func (c *Client) KeyedMetricQuery(cycle, category, objectType string, fromMS, untilMS int64, metrics []MetricSpec, objectIds []int64) (MetricResponseKeyed, error)
func (*Client) SimpleMetricQuery ¶
func (c *Client) SimpleMetricQuery(cycle, category, objectType string, fromMS, untilMS int64, metrics []MetricSpec, objectIds []int64) (MetricResponseSimple, error)
Simple Metric query is for when you are making a query that doesn't have any facets ("Keys").
type ExtraHopMetric ¶
type ExtraHopMetric struct { ObjectType string ObjectId int64 MetricCategory string MetricSpecName string MetricSpecCalcType string }
func StoEHMetric ¶
func StoEHMetric(i string) (ExtraHopMetric, error)
type MetricQuery ¶
type MetricQuery struct { // Can be"auto", "30sec", "5min", "1hr", "24hr" Cycle string `json:"cycle:` From int64 `json:"from"` // Currently these seem secret, can be net or app though Category string `json:"metric_category"` //Stats.Values in the response becomes increases in length when there are more than one stat MetricSpec Requested Specs []MetricSpec `json:"metric_specs"` // OID becomes ObjectIds []int64 `json:"object_ids"` //Can be "network", "device", "application", "vlan", "device_group", and "activity_group". Type string `json:"object_type"` Until int64 `json:"until"` }
Metrics
type MetricResponseBase ¶
type MetricResponseKeyed ¶
type MetricResponseKeyed struct { MetricResponseBase Stats []MetricStatKeyed `json:"stats"` }
func (*MetricResponseKeyed) OpenTSDBDataPoints ¶
func (mr *MetricResponseKeyed) OpenTSDBDataPoints(metrics []MetricSpec, objectKey string, objectIdToName map[int64]string) (opentsdb.MultiDataPoint, error)
Keyed Metric query is for when you are making a query that has facets ("Keys"). For example bytes "By L7 Protocol"
type MetricResponseSimple ¶
type MetricResponseSimple struct { MetricResponseBase Stats []MetricStatSimple `json:"stats"` }
func (*MetricResponseSimple) OpenTSDBDataPoints ¶
func (mr *MetricResponseSimple) OpenTSDBDataPoints(metricNames []string, objectKey string, objectIdToName map[int64]string) (opentsdb.MultiDataPoint, error)
type MetricSpec ¶
type MetricSpec struct { Name string `json:"name"` CalcType string `json:"calc_type"` // The type of Stats.Values changes when there are keys added. It goes from []ints to an [][]structs, so the tag can be included KeyPair Percentiles []int64 `json:"percentiles,omitempty"` // The following are not part of the extrahop API OpenTSDBMetric string `json:"-"` }
type MetricStat ¶
type MetricStatKeyed ¶
type MetricStatKeyed struct { MetricStat Values [][]struct { Key struct { KeyType string `json:"key_type"` Str string `json:"str"` } `json:"key"` Value int64 `json:"value"` Vtype string `json:"vtype"` } `json:"values"` }
type MetricStatSimple ¶
type MetricStatSimple struct { MetricStat Values []float64 `json:"values"` }
type NetworkList ¶
Click to show internal directories.
Click to hide internal directories.