Documentation
¶
Index ¶
- func MergeLabels(a map[string]string, b map[string]string) map[string]string
- type LabelUpdater
- type NginxCollector
- type NginxPlusCollector
- func (c *NginxPlusCollector) Collect(ch chan<- prometheus.Metric)
- func (c *NginxPlusCollector) DeleteServerZoneLabels(zoneNames []string)
- func (c *NginxPlusCollector) DeleteStreamServerZoneLabels(zoneNames []string)
- func (c *NginxPlusCollector) DeleteStreamUpstreamServerLabels(streamUpstreamNames []string)
- func (c *NginxPlusCollector) DeleteStreamUpstreamServerPeerLabels(peers []string)
- func (c *NginxPlusCollector) DeleteUpstreamServerLabels(upstreamNames []string)
- func (c *NginxPlusCollector) DeleteUpstreamServerPeerLabels(peers []string)
- func (c *NginxPlusCollector) Describe(ch chan<- *prometheus.Desc)
- func (c *NginxPlusCollector) UpdateServerZoneLabels(serverZoneLabelValues map[string][]string)
- func (c *NginxPlusCollector) UpdateStreamServerZoneLabels(streamServerZoneLabelValues map[string][]string)
- func (c *NginxPlusCollector) UpdateStreamUpstreamServerLabels(streamUpstreamServerLabelValues map[string][]string)
- func (c *NginxPlusCollector) UpdateStreamUpstreamServerPeerLabels(streamUpstreamServerPeerLabels map[string][]string)
- func (c *NginxPlusCollector) UpdateUpstreamServerLabels(upstreamServerLabelValues map[string][]string)
- func (c *NginxPlusCollector) UpdateUpstreamServerPeerLabels(upstreamServerPeerLabels map[string][]string)
- type VariableLabelNames
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LabelUpdater ¶ added in v0.9.0
type LabelUpdater interface {
UpdateUpstreamServerPeerLabels(upstreamServerPeerLabels map[string][]string)
DeleteUpstreamServerPeerLabels(peers []string)
UpdateUpstreamServerLabels(upstreamServerLabelValues map[string][]string)
DeleteUpstreamServerLabels(upstreamNames []string)
UpdateStreamUpstreamServerPeerLabels(streamUpstreamServerPeerLabels map[string][]string)
DeleteStreamUpstreamServerPeerLabels(peers []string)
UpdateStreamUpstreamServerLabels(streamUpstreamServerPeerLabels map[string][]string)
DeleteStreamUpstreamServerLabels(peers []string)
UpdateServerZoneLabels(serverZoneLabelValues map[string][]string)
DeleteServerZoneLabels(zoneNames []string)
UpdateStreamServerZoneLabels(streamServerZoneLabelValues map[string][]string)
DeleteStreamServerZoneLabels(zoneNames []string)
}
LabelUpdater updates the labels of upstream server and server zone metrics
type NginxCollector ¶
type NginxCollector struct {
// contains filtered or unexported fields
}
NginxCollector collects NGINX metrics. It implements prometheus.Collector interface.
func NewNginxCollector ¶
func NewNginxCollector(nginxClient *client.NginxClient, namespace string, constLabels map[string]string) *NginxCollector
NewNginxCollector creates an NginxCollector.
func (*NginxCollector) Collect ¶
func (c *NginxCollector) Collect(ch chan<- prometheus.Metric)
Collect fetches metrics from NGINX and sends them to the provided channel.
func (*NginxCollector) Describe ¶
func (c *NginxCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of NGINX metrics to the provided channel.
type NginxPlusCollector ¶
type NginxPlusCollector struct {
// contains filtered or unexported fields
}
NginxPlusCollector collects NGINX Plus metrics. It implements prometheus.Collector interface.
func NewNginxPlusCollector ¶
func NewNginxPlusCollector(nginxClient *plusclient.NginxClient, namespace string, variableLabelNames VariableLabelNames, constLabels map[string]string) *NginxPlusCollector
NewNginxPlusCollector creates an NginxPlusCollector.
func (*NginxPlusCollector) Collect ¶
func (c *NginxPlusCollector) Collect(ch chan<- prometheus.Metric)
Collect fetches metrics from NGINX Plus and sends them to the provided channel.
func (*NginxPlusCollector) DeleteServerZoneLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteServerZoneLabels(zoneNames []string)
DeleteServerZoneLabels deletes the Server Zone Labels
func (*NginxPlusCollector) DeleteStreamServerZoneLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteStreamServerZoneLabels(zoneNames []string)
DeleteStreamServerZoneLabels deletes the Stream Server Zone Labels
func (*NginxPlusCollector) DeleteStreamUpstreamServerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteStreamUpstreamServerLabels(streamUpstreamNames []string)
DeleteStreamUpstreamServerLabels deletes the Upstream Server Labels
func (*NginxPlusCollector) DeleteStreamUpstreamServerPeerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteStreamUpstreamServerPeerLabels(peers []string)
DeleteStreamUpstreamServerPeerLabels deletes the Upstream Server Peer Labels
func (*NginxPlusCollector) DeleteUpstreamServerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteUpstreamServerLabels(upstreamNames []string)
DeleteUpstreamServerLabels deletes the Upstream Server Labels
func (*NginxPlusCollector) DeleteUpstreamServerPeerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) DeleteUpstreamServerPeerLabels(peers []string)
DeleteUpstreamServerPeerLabels deletes the Upstream Server Peer Labels
func (*NginxPlusCollector) Describe ¶
func (c *NginxPlusCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of NGINX Plus metrics to the provided channel.
func (*NginxPlusCollector) UpdateServerZoneLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateServerZoneLabels(serverZoneLabelValues map[string][]string)
UpdateServerZoneLabels updates the Server Zone Labels
func (*NginxPlusCollector) UpdateStreamServerZoneLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateStreamServerZoneLabels(streamServerZoneLabelValues map[string][]string)
UpdateStreamServerZoneLabels updates the Stream Server Zone Labels
func (*NginxPlusCollector) UpdateStreamUpstreamServerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateStreamUpstreamServerLabels(streamUpstreamServerLabelValues map[string][]string)
UpdateStreamUpstreamServerLabels updates the Upstream Server Labels
func (*NginxPlusCollector) UpdateStreamUpstreamServerPeerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateStreamUpstreamServerPeerLabels(streamUpstreamServerPeerLabels map[string][]string)
UpdateStreamUpstreamServerPeerLabels updates the Upstream Server Peer Labels
func (*NginxPlusCollector) UpdateUpstreamServerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateUpstreamServerLabels(upstreamServerLabelValues map[string][]string)
UpdateUpstreamServerLabels updates the Upstream Server Labels
func (*NginxPlusCollector) UpdateUpstreamServerPeerLabels ¶ added in v0.9.0
func (c *NginxPlusCollector) UpdateUpstreamServerPeerLabels(upstreamServerPeerLabels map[string][]string)
UpdateUpstreamServerPeerLabels updates the Upstream Server Peer Labels
type VariableLabelNames ¶ added in v0.9.0
type VariableLabelNames struct {
UpstreamServerVariableLabelNames []string
ServerZoneVariableLabelNames []string
UpstreamServerPeerVariableLabelNames []string
StreamUpstreamServerPeerVariableLabelNames []string
StreamServerZoneVariableLabelNames []string
StreamUpstreamServerVariableLabelNames []string
}
VariableLabelNames holds all the variable label names for the different metrics
func NewVariableLabelNames ¶ added in v0.9.0
func NewVariableLabelNames(upstreamServerVariableLabelNames []string, serverZoneVariableLabelNames []string, upstreamServerPeerVariableLabelNames []string, streamUpstreamServerVariableLabelNames []string, streamServerZoneLabels []string, streamUpstreamServerPeerVariableLabelNames []string, ) VariableLabelNames
NewVariableLabels creates a new struct for VariableNames for the collector