Pushers¶
-
class
uwsgiconf.options.monitoring_pushers.
Pusher
(*args)¶
-
class
uwsgiconf.options.monitoring_pushers.
PusherSocket
(address, *, prefix=None)¶ Push metrics to a UDP server.
Uses the following format:
<metric> <type> <value>
<type>
- is in the numeric form of metric type.Parameters: - address (str) –
- prefix (str) – Arbitrary prefix to differentiate sender.
-
class
uwsgiconf.options.monitoring_pushers.
PusherRrdtool
(target_dir, *, library=None, push_interval=None)¶ This will store an rrd file for each metric in the specified directory.
Each rrd file has a single data source named “metric”.
Parameters: - target_dir (str) – Directory to store rrd files into.
- library (str) – Set the name of rrd library. Default: librrd.so.
- push_interval (int) – Set push frequency.
-
class
uwsgiconf.options.monitoring_pushers.
PusherStatsd
(address, *, prefix=None, no_workers=None, all_gauges=None)¶ Push metrics to a statsd server.
Parameters: - address (str) –
- prefix (str) – Arbitrary prefix to differentiate sender.
- no_workers (bool) – Disable generation of single worker metrics.
- all_gauges (bool) – Push all metrics to statsd as gauges.
-
class
uwsgiconf.options.monitoring_pushers.
PusherCarbon
(address, *, node_realm=None, node_root=None, push_interval=None, idle_avg_source=None, use_metrics=None, no_workers=None, timeout=None, retries=None, retries_delay=None, hostname_dots_replacer=None)¶ Push metrics to a Carbon server of Graphite.
Metric node format:
<node_root>.hostname.<node_realm>.metrics_data
.- http://uwsgi.readthedocs.io/en/latest/Carbon.html
- http://uwsgi.readthedocs.io/en/latest/tutorials/GraphiteAndMetrics.html
Parameters: - address (str|list[str]) – Host and port. Example: 127.0.0.1:2004
- node_realm (str) – Set carbon metrics realm node.
- node_root (str) – Set carbon metrics root node. Default: uwsgi.
- push_interval (int) – Set carbon push frequency in seconds. Default: 60.
- no_workers (bool) – Disable generation of single worker metrics.
- idle_avg_source (str) –
Average values source during idle period (no requests).
- Variants:
- last (default)
- zero
- none
- use_metrics (bool) –
Don’t compute all statistics, use metrics subsystem data instead.
Warning
Key names of built-in stats are different from those of metrics system.
- timeout (int) – Set carbon connection timeout in seconds. Default: 3.
- retries (int) – Set maximum number of retries in case of connection errors. Default: 1.
- retries_delay (int) – Set connection retry delay in seconds. Default: 7.
- hostname_dots_replacer (str) –
Set char to use as a replacement for dots in hostname in <node_root>.hostname.<node_realm>.metrics_data`
This affects Graphite aggregation mechanics.
Note
Dots are not replaced by default.
-
class
uwsgiconf.options.monitoring_pushers.
PusherZabbix
(address, *, prefix=None, template=None)¶ Push metrics to a zabbix server.
Parameters: - address (str) –
- prefix (str) – Arbitrary prefix to differentiate sender.
- template (str) – Print (or store to a file) the zabbix template for the current metrics setup.
-
class
uwsgiconf.options.monitoring_pushers.
PusherMongo
(*, address=None, collection=None, push_interval=None)¶ Push statistics (as JSON) the the specified MongoDB database.
Parameters: - address (str) – Default: 127.0.0.1:27017
- collection (str) – MongoDB colection to write into. Default: uwsgi.statistics
- push_interval (int) – Write interval in seconds.
-
class
uwsgiconf.options.monitoring_pushers.
PusherFile
(fpath=None, *, separator=None, push_interval=None)¶ Stores stats JSON into a file.
Note
Mainly for demonstration purposes.
Parameters: - fpath (str) – File path. Default: uwsgi.stats
- separator (str) – New entry separator. Default:
- push_interval (int) – Write interval in seconds.