Documentation ¶
Overview ¶
Package collector includes all individual collectors.
Index ¶
- Variables
- func DisableDefaultCollectors()
- func IsNoDataError(err error) bool
- type Collector
- type FabricLink
- type FabricLinks
- type Identities
- type Identity
- type LoginData
- type LoginOptions
- func (o *LoginOptions) ConfigureCerts(host string, ctrlURL *url.URL) error
- func (o *LoginOptions) RunFabricLinks() (FabricLinks, error)
- func (o *LoginOptions) RunIdentities() (Identities, error)
- func (o *LoginOptions) RunLogin() error
- func (o *LoginOptions) RunRouters() (Routers, error)
- func (o *LoginOptions) WriteCert(id string, cert []byte) (string, error)
- type LoginSession
- type MetaData
- type OpenZitiCollector
- type Router
- type Routers
Constants ¶
This section is empty.
Variables ¶
var ErrNoData = errors.New("collector returned no data")
ErrNoData indicates the collector found no data to collect, but had no other error.
Functions ¶
func DisableDefaultCollectors ¶
func DisableDefaultCollectors()
DisableDefaultCollectors sets the collector state to false for all collectors which have not been explicitly enabled on the command line.
func IsNoDataError ¶
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
type FabricLink ¶ added in v0.0.4
type FabricLink struct { Cost float64 `json:"cost"` DestLatency float64 `json:"destLatency"` DestRouter struct { Name string `json:"name"` } `json:"destRouter"` Down bool `json:"down"` ID string `json:"id"` Protocol string `json:"protocol"` SourceLatency float64 `json:"sourceLatency"` SourceRouter struct { Name string `json:"name"` } `json:"sourceRouter"` State string `json:"state"` StaticCost float64 `json:"staticCost"` }
FabricLink represent the meaningful chracteristics of a Ziti Fabric Link for this exporter
type FabricLinks ¶ added in v0.0.4
type FabricLinks struct { Data []FabricLink `json:"data"` Meta MetaData `json:"meta"` }
type Identities ¶
type Identity ¶
type Identity struct { CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` Disabled bool `json:"disabled"` HasAPISession bool `json:"hasApiSession"` HasEdgeRouterConnection bool `json:"hasEdgeRouterConnection"` Name string `json:"name"` RoleAttributes []string `json:"roleAttributes"` SdkInfo struct { Type string `json:"type"` Version string `json:"version"` } `json:"sdkInfo"` TypeID string `json:"typeId"` }
Identity represent the meaningful chracteristics of a Ziti Identity for this exporter
type LoginData ¶
type LoginData struct { CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` ExpiresAt string `json:"expiresAt"` Token string `json:"token"` }
LoginData represent the meaningful chracteristics of a Ziti Authentication endpoint
type LoginOptions ¶
type LoginOptions struct { api.Options Username string Password string Host string HostReadyEdgeManagementAPI string HostReadyFabricAPI string Token string Logger log.Logger CaCert string ReadOnly bool Yes bool IgnoreConfig bool ClientCert string ClientKey string ExtJwt string IdentTypeFilter []string }
LoginOptions are the flags for login commands
func (*LoginOptions) ConfigureCerts ¶
func (o *LoginOptions) ConfigureCerts(host string, ctrlURL *url.URL) error
func (*LoginOptions) RunFabricLinks ¶ added in v0.0.4
func (o *LoginOptions) RunFabricLinks() (FabricLinks, error)
RunFabricLinks implements this command
func (*LoginOptions) RunIdentities ¶
func (o *LoginOptions) RunIdentities() (Identities, error)
RunIdentities implements this command
func (*LoginOptions) RunLogin ¶
func (o *LoginOptions) RunLogin() error
RunLogin implements this command
func (*LoginOptions) RunRouters ¶
func (o *LoginOptions) RunRouters() (Routers, error)
RunRouters implements this command
type LoginSession ¶
type LoginSession struct {
Data LoginData `json:"data"`
}
type MetaData ¶
type MetaData struct { Pagination struct { TotalCount int `json:"totalCount"` } `json:"pagination"` }
MetaData represent the pagination part of a Ziti Identity call
type OpenZitiCollector ¶
type OpenZitiCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
OpenZitiCollector implements the prometheus.Collector interface.
func NewOpenZitiCollector ¶
func NewOpenZitiCollector(logger log.Logger, options *LoginOptions, filters ...string) (*OpenZitiCollector, error)
NewOpenZitiCollector creates a new OpenZitiCollector.
func (OpenZitiCollector) Collect ¶
func (n OpenZitiCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (OpenZitiCollector) Describe ¶
func (n OpenZitiCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type Router ¶
type Router struct { Disabled bool `json:"disabled"` Hostname string `json:"hostname"` IsOnline bool `json:"isOnline"` Name string `json:"name"` NoTraversal bool `json:"noTraversal"` SyncStatus string `json:"syncStatus"` IsTunnelerEnabled bool `json:"isTunnelerEnabled"` IsVerified bool `json:"isVerified"` RoleAttributes []string `json:"roleAttributes"` VersionInfo struct { Version string `json:"version"` } `json:"versionInfo"` }
Router represent the meaningful chracteristics of a Ziti Router for this exporter