pktvisor

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSnapshot

type AppSnapshot struct {
	App struct {
		DeepSampleRatePct int64   `json:"deep_sample_rate_pct"`
		Periods           int64   `json:"periods"`
		SingleSummary     bool    `json:"single_summary"`
		UpTimeMin         float64 `json:"up_time_min"`
		Version           string  `json:"version"`
	} `json:"app"`
	Dns struct {
		Xact struct {
			Open int64 `json:"open"`
		} `json:"xact"`
	} `json:"dns"`
}

type Client

type Client struct {
	Timeout           time.Duration
	ConnectionRetries int
}

func NewClient

func NewClient(timeout time.Duration, connectionRetries int) *Client

func (*Client) GetAppStats

func (c *Client) GetAppStats(host string, port string) (AppSnapshot, error)

func (*Client) GetBucketStats

func (c *Client) GetBucketStats(host string, port string, duration int) (StatSnapshot, error)

type NameCount

type NameCount struct {
	Name     string `json:"name"`
	Estimate int64  `json:"estimate"`
}

type StatSnapshot

type StatSnapshot struct {
	DNS struct {
		WirePackets struct {
			Ipv4     int64 `json:"ipv4"`
			Ipv6     int64 `json:"ipv6"`
			Queries  int64 `json:"queries"`
			Replies  int64 `json:"replies"`
			Tcp      int64 `json:"tcp"`
			Total    int64 `json:"total"`
			Udp      int64 `json:"udp"`
			NoError  int64 `json:"noerror"`
			NxDomain int64 `json:"nxdomain"`
			SrvFail  int64 `json:"srvfail"`
			Refused  int64 `json:"refused"`
		} `json:"wire_packets"`
		Cardinality struct {
			Qname int64 `json:"qname"`
		} `json:"cardinality"`
		Xact struct {
			Counts struct {
				Total int64 `json:"total"`
			} `json:"counts"`
			In struct {
				QuantilesUS struct {
					P50 int64 `json:"p50"`
					P90 int64 `json:"p90"`
					P95 int64 `json:"p95"`
					P99 int64 `json:"p99"`
				} `json:"quantiles_us"`
				TopSlow []NameCount `json:"top_slow"`
				Total   int64       `json:"total"`
			} `json:"in"`
			Out struct {
				QuantilesUS struct {
					P50 int64 `json:"p50"`
					P90 int64 `json:"p90"`
					P95 int64 `json:"p95"`
					P99 int64 `json:"p99"`
				} `json:"quantiles_us"`
				TopSlow []NameCount `json:"top_slow"`
				Total   int64       `json:"total"`
			} `json:"out"`
		} `json:"xact"`
		TopQname2   []NameCount `json:"top_qname2"`
		TopQname3   []NameCount `json:"top_qname3"`
		TopNX       []NameCount `json:"top_nxdomain"`
		TopQtype    []NameCount `json:"top_qtype"`
		TopRcode    []NameCount `json:"top_rcode"`
		TopREFUSED  []NameCount `json:"top_refused"`
		TopSRVFAIL  []NameCount `json:"top_srvfail"`
		TopUDPPorts []NameCount `json:"top_udp_ports"`
	} `json:"dns"`
	Packets struct {
		Cardinality struct {
			DstIpsOut int64 `json:"dst_ips_out"`
			SrcIpsIn  int64 `json:"src_ips_in"`
		} `json:"cardinality"`
		Ipv4        int64 `json:"ipv4"`
		Ipv6        int64 `json:"ipv6"`
		Tcp         int64 `json:"tcp"`
		Total       int64 `json:"total"`
		Udp         int64 `json:"udp"`
		In          int64 `json:"in"`
		Out         int64 `json:"out"`
		OtherL4     int64 `json:"other_l4"`
		DeepSamples int64 `json:"deep_samples"`
		Rates       struct {
			Pps_in struct {
				P50 int64 `json:"p50"`
				P90 int64 `json:"p90"`
				P95 int64 `json:"p95"`
				P99 int64 `json:"p99"`
			} `json:"pps_in"`
			Pps_out struct {
				P50 int64 `json:"p50"`
				P90 int64 `json:"p90"`
				P95 int64 `json:"p95"`
				P99 int64 `json:"p99"`
			} `json:"pps_out"`
		} `json:"rates"`
		TopIpv4   []NameCount `json:"top_ipv4"`
		TopIpv6   []NameCount `json:"top_ipv6"`
		TopGeoLoc []NameCount `json:"top_geoLoc"`
		TopASN    []NameCount `json:"top_asn"`
	} `json:"packets"`
	Period struct {
		StartTS int64 `json:"start_ts"`
		Length  int64 `json:"length"`
	} `json:"period"`
}

Jump to

Keyboard shortcuts

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