Documentation ¶
Index ¶
- type Account
- type AttackHistory
- type Caching
- type ClientHTTPVersionMap
- type ClientSSLMap
- type CloudflareCollector
- type ContentTypeMap
- type CountryMap
- type DNSAnalytics
- type DNSAnalyticsResponse
- type Dimensions
- type FwDimensions
- type FwEvent
- type NetworkDimensions
- type Requests
- type RequestsData
- type RespDataStruct
- type ResponseStatusMap
- type SumAttacks
- type SumEdgeResponseBytes
- type Viewer
- type Worker
- type WorkersInfo
- type WorkersQuantiles
- type WorkersSum
- type Zones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { NetAttacks []AttackHistory `json:"attackHistory"` Workers []Worker `json:"workers"` }
type AttackHistory ¶
type AttackHistory struct { NetworkDimensions NetworkDimensions `json:"networkDimensions"` Sum SumAttacks `json:"sum"` }
type Caching ¶
type Caching struct { Dimensions Dimensions `json:"dimensions"` SumEdgeResponseBytes SumEdgeResponseBytes `json:"sumEdgeResponseBytes"` }
type ClientHTTPVersionMap ¶
type ClientSSLMap ¶
type CloudflareCollector ¶
type CloudflareCollector struct { API *cloudflare.API // contains filtered or unexported fields }
CloudflareCollector is the structure that stores all the information related to the collector
func New ¶
func New(apiKey, apiMail, AccountID, zoneName, dataset string) *CloudflareCollector
NewCloudflareCollector returns an initialized Collector.
func (*CloudflareCollector) Collect ¶
func (collector *CloudflareCollector) Collect(ch chan<- prometheus.Metric)
Collect fetches the stats from Cloudflare zones and delivers them as Prometheus metrics. It implements prometheus.Collector.
func (*CloudflareCollector) Describe ¶
func (collector *CloudflareCollector) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics ever exported by the Cloudflare exporter. It implements prometheus.Collector.
func (*CloudflareCollector) Validate ¶
func (collector *CloudflareCollector) Validate() error
Validate checks the configuration parameters given to the Collector
type ContentTypeMap ¶
type CountryMap ¶
type DNSAnalytics ¶
type DNSAnalytics struct { Data []struct { Dimensions []string `json:"dimensions"` Metrics []float64 `json:"metrics"` } `json:"data"` Totals struct { QueryCount int `json:"queryCount"` ResponseTime90Th int `json:"responseTime90th"` ResponseTime99Th int `json:"responseTime99th"` ResponseTimeAvg float64 `json:"responseTimeAvg"` ResponseTimeMedian int `json:"responseTimeMedian"` StaleCount int `json:"staleCount"` UncachedCount int `json:"uncachedCount"` } `json:"totals"` }
type DNSAnalyticsResponse ¶
type DNSAnalyticsResponse struct {
Result DNSAnalytics `json:"result"`
}
type Dimensions ¶
type FwDimensions ¶
type FwEvent ¶
type FwEvent struct { Count int `json:"count"` Dimensions FwDimensions `json:"dimensions"` }
type NetworkDimensions ¶
type Requests ¶
type Requests struct {
RequestsData RequestsData `json:"requestsData"`
}
type RequestsData ¶
type RequestsData struct { Bytes int `json:"bytes"` CachedBytes int `json:"cachedBytes"` EncryptedBytes int `json:"encryptedBytes"` Requests int `json:"requests"` CachedRequests int `json:"cachedRequests"` EncryptedRequests int `json:"encryptedRequests"` ResponseStatusMap []ResponseStatusMap `json:"responseStatusMap"` ClientSSLMap []ClientSSLMap `json:"clientSSLMap"` ClientHTTPVersionMap []ClientHTTPVersionMap `json:"clientHTTPVersionMap"` ContentTypeMap []ContentTypeMap `json:"contentTypeMap"` CountryMap []CountryMap `json:"countryMap"` }
type RespDataStruct ¶
type RespDataStruct struct {
Viewer Viewer `json:"viewer"`
}
type ResponseStatusMap ¶
type SumAttacks ¶
type SumEdgeResponseBytes ¶
type SumEdgeResponseBytes struct {
EdgeResponseBytes int `json:"edgeResponseBytes"`
}
type Worker ¶
type Worker struct { Info WorkersInfo `json:"info"` Quantiles WorkersQuantiles `json:"quantiles"` Sum WorkersSum `json:"sum"` }
type WorkersInfo ¶
type WorkersInfo struct {
Name string `json:"scriptName"`
}
type WorkersQuantiles ¶
type WorkersSum ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.