faucet.watcher module

Gauge watcher implementations.

class faucet.watcher.GaugeFlowTableLogger(conf, logname, prom_client)[source]

Bases: faucet.gauge_pollers.GaugeFlowTablePoller

Periodically dumps the current datapath flow table as a yaml object.

Includes a timestamp and a reference ($DATAPATHNAME-flowtables). The flow table is dumped as an OFFlowStatsReply message (in yaml format) that matches all flows.

optionally the output can be compressed by setting compressed: true in the config for this watcher

class faucet.watcher.GaugeMeterStatsLogger(conf, logname, prom_client)[source]

Bases: faucet.gauge_pollers.GaugeMeterStatsPoller

Abstraction for meter statistics logger.

class faucet.watcher.GaugePortStateLogger(conf, logname, prom_client)[source]

Bases: faucet.gauge_pollers.GaugePortStatePoller

Abstraction for port state logger.


Called when a polling cycle passes without receiving a response.


Send a stats request to a datapath.

class faucet.watcher.GaugePortStatsLogger(conf, logname, prom_client)[source]

Bases: faucet.gauge_pollers.GaugePortStatsPoller

Abstraction for port statistics logger.


Return a Gauge object based on type.


conf (GaugeConf) – object with the configuration for this valve.