faucet.gauge_prom module¶
Prometheus for Gauge.
-
class
faucet.gauge_prom.
GaugeFlowTablePrometheusPoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugeFlowTablePoller
Export flow table entries to Prometheus.
-
update
(rcv_time, dp_id, msg)[source]¶ Handle the responses to requests.
Called when a reply to a stats request sent by this object is received by the controller.
It should acknowledge the receipt by setting self.reply_pending to false.
- Parameters
rcv_time – the time the response was received
dp_id – DP ID
msg – the stats reply message
-
-
class
faucet.gauge_prom.
GaugePortStatePrometheusPoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugePortStatePoller
Export port state changes to Prometheus.
-
update
(rcv_time, dp_id, msg)[source]¶ Handle the responses to requests.
Called when a reply to a stats request sent by this object is received by the controller.
It should acknowledge the receipt by setting self.reply_pending to false.
- Parameters
rcv_time – the time the response was received
dp_id – DP ID
msg – the stats reply message
-
-
class
faucet.gauge_prom.
GaugePortStatsPrometheusPoller
(conf, logger, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugePortStatsPoller
Exports port stats to Prometheus.
-
update
(rcv_time, dp_id, msg)[source]¶ Handle the responses to requests.
Called when a reply to a stats request sent by this object is received by the controller.
It should acknowledge the receipt by setting self.reply_pending to false.
- Parameters
rcv_time – the time the response was received
dp_id – DP ID
msg – the stats reply message
-
-
class
faucet.gauge_prom.
GaugePrometheusClient
(reg=None)[source]¶ Bases:
faucet.prom_client.PromClient
Wrapper for Prometheus client that is shared between all pollers.