Skip to content

Collectors

Classes

CollectorAccumulator

CollectorAccumulator(what)

Collector

Always add the sum of children to the final value.

Example:

1
2
* Round 1: child1 = 22, child2 = 17 -> metric_value = 39
* Round 2: child1 = 26, child2 = 30 -> metric_value += 56

alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorAdder

CollectorAdder(what, value: int)

Collector

Add the specified argument (arg1n) to the sum of children.


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorAvg

CollectorAvg(what)

Collector

The value is the algebraic average of the children.

Note

Since 1.9.20


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorFile

CollectorFile(fpath: str, get_slot: int | None = None)

Collector

The value is collected from a file.


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorFunction

CollectorFunction(func: str)

Collector

The value is computed calling a specific C function every time.

Note

  • The argument it takes is a uwsgi_metric pointer. You generally do not need to parse the metric, so just casting to void will avoid headaches.

  • The function must returns an int64_t value.


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorMultiplier

CollectorMultiplier(what, value: int)

CollectorAdder

Multiply the sum of children by the specified argument.

Example:

1
* child1 = 22, child2 = 17, arg1n = 3 -> metric_value = (22+17)*3

alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorPointer

CollectorPointer(*args, **kwargs)

Collector

The value is collected from memory pointer.


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


CollectorSum

CollectorSum(what)

Collector

The value is the sum of other metrics.


alias

.alias: str = ''

Alias to address this value.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.