devices

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID    int    `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Score int    `json:"score,omitempty"`
}

type AverageLatency

type AverageLatency struct {
	LegSRC  string `json:"leg_src,omitempty"`
	LegDst  string `json:"leg_dst,omitempty"`
	Latency int    `json:"latency,omitempty"`
}

type CallQualityMetrics

type CallQualityMetrics struct {
	MeetID        string          `json:"meet_id,omitempty"`
	MeetSessionID string          `json:"meet_session_id,omitempty"`
	MeetSubject   string          `json:"meet_subject,omitempty"`
	Metrics       []common.Metric `json:"metrics,omitempty"`
}

type CloudPath

type CloudPath struct {
	SRC           string `json:"src,omitempty"`
	DST           string `json:"dst,omitempty"`
	NumHops       int    `json:"num_hops,omitempty"`
	Latency       int    `json:"latency,omitempty"`
	Loss          int    `json:"loss,omitempty"`
	NumUnrespHops int    `json:"num_unresp_hops,omitempty"`
	TunnelType    int    `json:"tunnel_type,omitempty"`
	Hops          []Hops `json:"hops,omitempty"`
}

type DeviceCloudPath

type DeviceCloudPath struct {
	TimeStamp int         `json:"timestamp,omitempty"`
	CloudPath []CloudPath `json:"cloudpath,omitempty"`
}

type DeviceCloudPathProbe

type DeviceCloudPathProbe struct {
	ID             int              `json:"id,omitempty"`
	Name           string           `json:"name,omitempty"`
	NumProbes      int              `json:"num_probes,omitempty"`
	AverageLatency []AverageLatency `json:"avg_latencies,omitempty"`
}

type DeviceCloudPathProbeMetric

type DeviceCloudPathProbeMetric struct {
	LegSRC string          `json:"leg_src,omitempty"`
	LegDst string          `json:"leg_dst,omitempty"`
	Stats  []common.Metric `json:"stats,omitempty"`
}

type DeviceDetail

type DeviceDetail struct {
	ID       int       `json:"id"`
	Name     string    `json:"name,omitempty"`
	Hardware *Hardware `json:"hardware,omitempty"`
	Network  []Network `json:"network,omitempty"`
	Software *Software `json:"software,omitempty"`
}

type DeviceEvents

type DeviceEvents struct {
	TimeStamp int      `json:"timestamp,omitempty"`
	Events    []Events `json:"instances,omitempty"`
}

type DeviceWebProbe

type DeviceWebProbe struct {
	ID        int    `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	NumProbes int    `json:"num_probes,omitempty"`
	AvgScore  int    `json:"avg_score,omitempty"`
	AvgPFT    int    `json:"avg_pft,omitempty"`
}

type Events

type Events struct {
	Category    string `json:"category,omitempty"`
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"display_name,omitempty"`
	Prev        string `json:"prev,omitempty"`
	Curr        string `json:"curr,omitempty"`
}

type GeoLocation

type GeoLocation struct {
	ID          int           `json:"id"`
	Name        string        `json:"name,omitempty"`
	GeoType     string        `json:"geo_type,omitempty"`
	Description string        `json:"description,omitempty"`
	Children    []GeoLocation `json:"children,omitempty"`
}

type GeoLocationFilter

type GeoLocationFilter struct {
	common.GetFromToFilters
	// The parent geo ID.
	ParentGeoID string `json:"parent_geo_id,omitempty" url:"parent_geo_id,omitempty"`
	// The search string used to support search by name.
	Search string `json:"search,omitempty" url:"search,omitempty"`
}

type GetDevicesFilters

type GetDevicesFilters struct {
	common.GetFromToFilters
	// The user IDs.
	UserIDs []int `json:"userids,omitempty" url:"userids,omitempty"`
	// Emails
	Emails []string `json:"emails,omitempty" url:"emails,omitempty"`
	// The Zscaler location (ID). You can add multiple location IDs.
	Loc []int `json:"loc,omitempty" url:"loc,omitempty"`
	// The department (ID). You can add multiple department IDs.
	Dept []int `json:"dept,omitempty" url:"dept,omitempty"`
	// The active geolocation (ID). You can add multiple active geolocation IDs.
	Geo []string `json:"geo,omitempty" url:"geo,omitempty"`
	// The next_offset value from the last request. You must enter this value to get the next batch from the list. When the next_offset value becomes null, the list is complete.
	Offset string `json:"offset,omitempty" url:"offset,omitempty"`
	// The number of items that must be returned per request from the list.
	Limit int `json:"limit,omitempty" url:"limit,omitempty"`
}

type Hardware

type Hardware struct {
	HWModel     string `json:"hw_model,omitempty"`
	HWMFG       string `json:"hw_mfg,omitempty"`
	HWType      string `json:"hw_type,omitempty"`
	HWSerial    string `json:"hw_serial,omitempty"`
	TotMem      string `json:"tot_mem,omitempty"`
	GPU         string `json:"gpu,omitempty"`
	DiskSize    string `json:"disk_size,omitempty"`
	DiskModel   string `json:"disk_model,omitempty"`
	DiskType    string `json:"disk_type,omitempty"`
	CPUMFG      string `json:"cpu_mfg,omitempty"`
	CPUModel    string `json:"cpu_model,omitempty"`
	SpeedGHZ    int    `json:"speed_ghz,omitempty"`
	LogicalProc int    `json:"logical_proc,omitempty"`
	NumCores    int    `json:"num_cores,omitempty"`
}

type HealthMetrics

type HealthMetrics struct {
	Category  string      `json:"category,omitempty"`
	Instances []Instances `json:"instances,omitempty"`
}

type Hops

type Hops struct {
	IP          string `json:"ip,omitempty"`
	GWMac       string `json:"gw_mac,omitempty"`
	GWMacVendor string `json:"gw_mac_vendor,omitempty"`
	PkgSent     int    `json:"pkt_sent,omitempty"`
	PkgRcvd     int    `json:"pkt_rcvd,omitempty"`
	LatencyMin  int    `json:"latency_min,omitempty"`
	LatencyMax  int    `json:"latency_max,omitempty"`
	LatencyAvg  int    `json:"latency_avg,omitempty"`
	LatencyDiff int    `json:"latency_diff,omitempty"`
}

type Instances

type Instances struct {
	Name    string          `json:"metric,omitempty"`
	Metrics []common.Metric `json:"metrics,omitempty"`
}

type Network

type Network struct {
	NetType     string `json:"net_type,omitempty"`
	Status      string `json:"status,omitempty"`
	IPv4        string `json:"ipv4,omitempty"`
	IPv6        string `json:"ipv6,omitempty"`
	DNSSRVS     string `json:"dns_srvs,omitempty"`
	DNSSuffix   string `json:"dns_suffix,omitempty"`
	Gateway     string `json:"gateway,omitempty"`
	MAC         string `json:"mac,omitempty"`
	GUID        string `json:"guid,omitempty"`
	WiFiAdapter string `json:"wifi_adapter,omitempty"`
	WiFiType    string `json:"wifi_type,omitempty"`
	SSID        string `json:"ssid,omitempty"`
	Channel     string `json:"channel,omitempty"`
	BSSID       string `json:"bssid,omitempty"`
}

type Service

type Service struct {
	Client *zdx.Client
}

func New

func New(c *zdx.Client) *Service

func (*Service) Get

func (service *Service) Get(deviceID string) (*DeviceDetail, *http.Response, error)

Gets the device details including the device model information, tunnel type, network, and software details. The JSON must contain the user ID and email address to associate the device to a user. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetAll

func (service *Service) GetAll(filters GetDevicesFilters) ([]DeviceDetail, *http.Response, error)

Gets the list of all active devices and its basic details. The JSON must contain the user's ID and email address to associate the device to the user. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetAllApps

func (service *Service) GetAllApps(deviceID string, filters common.GetFromToFilters) ([]App, *http.Response, error)

Gets the list all active applications for a device. The endpoint gets the ZDX score each application. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetAllCloudPathProbes

func (service *Service) GetAllCloudPathProbes(deviceID, appID string, filters common.GetFromToFilters) ([]DeviceCloudPathProbe, *http.Response, error)

Gets the list of all active Cloud Path probes on a device. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetAllWebProbes

func (service *Service) GetAllWebProbes(deviceID, appID string, filters common.GetFromToFilters) ([]DeviceWebProbe, *http.Response, error)

Gets the list of all active web probes on a device. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetApp

func (service *Service) GetApp(deviceID, appID string, filters common.GetFromToFilters) (*App, *http.Response, error)

Gets the application's ZDX score trend for a device. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetCloudPathProbesMetric

func (service *Service) GetCloudPathProbesMetric(deviceID, appID, probeID string, filters common.GetFromToFilters) (*DeviceCloudPathProbeMetric, *http.Response, error)

Gets the CloudPath Probe's metric trend on a device for an application. For Cloud Path Probes, you can access latency metrics for End to End, Client - Egress, Egress - Application, ZIA Service Edge- Egress, and ZIA Service Edge - Application. If not specified, it defaults to End to End latency. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetDeviceCloudPath

func (service *Service) GetDeviceCloudPath(deviceID, appID, probeID string, filters common.GetFromToFilters) (*DeviceCloudPath, *http.Response, error)

Gets the Cloud Path hop data for an application on a specific device. Includes the summary data for the entire path like the total number of hops, packet loss, latency, and tunnel type (if available). It also includes a similar summary of data for each individual hop. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetEvents

func (service *Service) GetEvents(deviceID string, filters common.GetFromToFilters) (*DeviceEvents, *http.Response, error)

Gets the Events metrics trend for a device. If the time range is not specified, the endpoint defaults to the last 2 hours. The event metrics include Zscaler, Hardware, Software and Network event changes.

func (*Service) GetGeoLocations

func (service *Service) GetGeoLocations(filters GeoLocationFilter) (*GeoLocation, *http.Response, error)

Gets the list of all active geolocations for the time range specified. If not specified, the endpoint defaults to the last 2 hours. The state and city data is retrieved only for the US.

func (*Service) GetHealthMetrics

func (service *Service) GetHealthMetrics(deviceID string, filters common.GetFromToFilters) (*HealthMetrics, *http.Response, error)

Gets the health metrics trend for a device. If the time range is not specified, the endpoint defaults to the last 2 hours. The health metrics include CPU, Memory, Disk I/O, Network I/O, Wi-Fi, Network Bandwidth, etc.

func (*Service) GetQualityMetrics

func (service *Service) GetQualityMetrics(deviceID, appID string, filters common.GetFromToFilters) (*CallQualityMetrics, *http.Response, error)

Gets the Call Quality metric trend for a device for a CQM application. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetWebProbes

func (service *Service) GetWebProbes(deviceID, appID, probeID string, filters common.GetFromToFilters) (*common.Metric, *http.Response, error)

Gets the Web Probe metrics trend on a device for an application. For Web Probes, you can access Page Fetch Time, Server Response Time, DNS Time, or Availability. If not specified, it defaults to Page Fetch Time (PFT). If the time range is not specified, the endpoint defaults to the last 2 hours.

type Software

type Software struct {
	OSName        string `json:"os_name,omitempty"`
	OSVer         string `json:"os_ver,omitempty"`
	Hostname      string `json:"hostname,omitempty"`
	NetBios       string `json:"netbios,omitempty"`
	User          string `json:"user,omitempty"`
	ClientConnVer string `json:"client_conn_ver,omitempty"`
	ZDXVer        string `json:"zdx_ver,omitempty"`
}

Jump to

Keyboard shortcuts

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