monitoring

package
v5.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 9 Imported by: 5

Documentation

Overview

Package monitoring contains handlers and supporting logic for the /cdns/{{CDN Name}}/configs/monitoring Traffic Ops API endpoint.

Index

Constants

View Source
const CacheMonitorConfigFile = "rascal.properties"
View Source
const DeliveryServiceStatus = "REPORTED"
View Source
const KilobitsPerMegabit = 1000
View Source
const MonitorConfigFile = "rascal-config.txt"
View Source
const MonitorProfilePrefix = "RASCAL"
View Source
const MonitorType = "RASCAL"
View Source
const RouterType = "CCR"

Variables

This section is empty.

Functions

func Get

func Get(w http.ResponseWriter, r *http.Request)

Types

type BasicServer

type BasicServer struct {
	CommonServerProperties
	IP  string `json:"ip"`
	IP6 string `json:"ip6"`
}

type Cache

type Cache struct {
	CommonServerProperties
	Interfaces []tc.ServerInterfaceInfo `json:"interfaces"`
	Type       string                   `json:"type"`
	HashID     string                   `json:"hashid"`
}

type Cachegroup

type Cachegroup struct {
	Name        string      `json:"name"`
	Coordinates Coordinates `json:"coordinates"`
}

type CommonServerProperties

type CommonServerProperties struct {
	Profile    string `json:"profile"`
	Status     string `json:"status"`
	Port       int    `json:"port"`
	Cachegroup string `json:"cachegroup"`
	HostName   string `json:"hostname"`
	FQDN       string `json:"fqdn"`
}

type Coordinates

type Coordinates struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type DeliveryService

type DeliveryService struct {
	XMLID              string  `json:"xmlId"`
	TotalTPSThreshold  float64 `json:"totalTpsThreshold"`
	Status             string  `json:"status"`
	TotalKBPSThreshold float64 `json:"totalKbpsThreshold"`
}

type LegacyCache

type LegacyCache struct {
	BasicServer
	InterfaceName string `json:"interfacename"`
	Type          string `json:"type"`
	HashID        string `json:"hashid"`
}

LegacyCache represents a Cache for ATC versions before 5.0.

type LegacyMonitoring

type LegacyMonitoring struct {
	TrafficServers   []LegacyCache          `json:"trafficServers"`
	TrafficMonitors  []Monitor              `json:"trafficMonitors"`
	Cachegroups      []Cachegroup           `json:"cacheGroups"`
	Profiles         []Profile              `json:"profiles"`
	DeliveryServices []DeliveryService      `json:"deliveryServices"`
	Config           map[string]interface{} `json:"config"`
}

LegacyMonitoring represents Monitoring for ATC versions before 5.0.

type LegacyMonitoringResponse

type LegacyMonitoringResponse struct {
	Response LegacyMonitoring `json:"response"`
}

LegacyMonitoringResponse represents MontiroingResponse for ATC versions before 5.0.

type Monitor

type Monitor struct {
	BasicServer
}

type Monitoring

type Monitoring struct {
	TrafficServers   []Cache                `json:"trafficServers"`
	TrafficMonitors  []Monitor              `json:"trafficMonitors"`
	Cachegroups      []Cachegroup           `json:"cacheGroups"`
	Profiles         []Profile              `json:"profiles"`
	DeliveryServices []DeliveryService      `json:"deliveryServices"`
	Config           map[string]interface{} `json:"config"`
}

func GetMonitoringJSON

func GetMonitoringJSON(tx *sql.Tx, cdnName string) (*Monitoring, error)

type MonitoringResponse

type MonitoringResponse struct {
	Response Monitoring `json:"response"`
}

type Profile

type Profile struct {
	Name       string                 `json:"name"`
	Type       string                 `json:"type"`
	Parameters map[string]interface{} `json:"parameters"`
}

type Router

type Router struct {
	Type    string
	Profile string
}

Jump to

Keyboard shortcuts

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