Monitoring¶
Classes¶
Monitoring¶
Monitoring facilities.
-
Stats - http://uwsgi.readthedocs.io/en/latest/StatsServer.html Set of metrics gathered from uWSGI internals.
-
Metrics - http://uwsgi.readthedocs.io/en/latest/Metrics.html Basic set of metrics gathered from uWSGI internals + user defined metrics.
enable_snmp¶
Enables SNMP.
uWSGI server embeds a tiny SNMP server that you can use to integrate your web apps with your monitoring infrastructure.
Note
SNMP server is started in the master process after dropping the privileges.
If you want it to listen on a privileged port, you can either use Capabilities on Linux,
or use the as-root option to run the master process as root.
register_metric¶
Officially Registered Metrics:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
register_stats_pusher¶
Registers a pusher to be used for pushing statistics to various remotes/locals.
set_metrics_params¶
-
Enables the subsystem.
-
Directory to store metrics. The metrics subsystem can expose all of its metrics in the form of text files in a directory. The content of each file is the value of the metric (updated in real time).
Note
Placeholders can be used to build paths, e.g.: {project_runtime_dir}/metrics/ See
Section.project_nameandSection.runtime_dir. -
Restore previous metrics from
store_dir. When you restart a uWSGI instance, all of its metrics are reset. Use the option to force the metric subsystem to read-back the values from the metric directory before starting to collect values. -
Disable generation of cores-related metrics.
Sets basic Metrics subsystem params.
uWSGI metrics subsystem allows you to manage "numbers" from your apps.
When enabled, the subsystem configures a vast amount of metrics (like requests per-core, memory usage, etc.) but, in addition to this, you can configure your own metrics, such as the number of active users or, say, hits of a particular URL, as well as the memory consumption of your app or the whole server.
set_metrics_threshold¶
-
Metric name.
-
Threshold value.
-
Threshold check interval in seconds.
-
Reset value to when threshold is reached.
-
Message to pass to alarm. If not set metrics name is passed.
Sets metric threshold parameters.
set_stats_params¶
-
Address/socket to make stats available on.
1 2 3 4
Examples: * 127.0.0.1:1717 * /tmp/statsock * :5050 -
Server stats over HTTP. Prefixes stats server json output with http headers.
-
Minify statistics json output.
-
Disable generation of cores-related stats.
-
Do not include metrics in stats output.
-
Set the default frequency of stats pushers in seconds/
Enables stats server on the specified address.
metric_types¶
Various metric types to represent data of various nature.
User metrics must inherit from one of those.
pushers¶
Means to deliver metrics to various remotes or locals.
These are available for .register_stats_pusher().