Alarms
Classes
Alarms
OptionsGroup
Alarms.
This subsystem allows the developer/sysadmin to "announce"
special conditions of an app via various channels.
name
Name to represent the group.
plugin
| .plugin: bool | str = False
|
Indication this option group belongs to a plugin.
alarm_on_fd_ready
| .alarm_on_fd_ready(
alarm: TypeAlarmExt, # (1)!
fd: str, # (2)!
message: str, # (3)!
byte_count: int | None = None, # (4)!
)
|
-
Alarm.
-
File descriptor.
-
Message to send.
-
Files to read. Default: 1 byte.
| .. note:: For ``eventfd`` set 8.
|
Triggers the alarm when the specified file descriptor is ready for read.
This is really useful for integration with the Linux eventfd() facility.
Pretty low-level and the basis of most of the alarm plugins.
alarm_on_log
| .alarm_on_log(
alarm: TypeAlarmExt, # (1)!
matcher: str, # (2)!
skip: bool = False
)
|
-
Alarm.
-
Regular expression to match log line.
Raise (or skip) the specified alarm when a log line matches the specified regexp.
alarm_on_queue_full
| .alarm_on_queue_full(
alarm: TypeAlarmExt, # (1)!
)
|
- Alarm.
Raise the specified alarm when the socket backlog queue is full.
alarm_on_segfault
| .alarm_on_segfault(
alarm: TypeAlarmExt, # (1)!
)
|
- Alarm.
Raise the specified alarm when the segmentation fault handler is executed.
Sends a backtrace.
print_alarms
Print out enabled alarms.
register_alarm
| .register_alarm(
alarm: TypeAlarmExt, # (1)!
)
|
- Alarm.
Register (create) an alarm.
set_basic_params
| .set_basic_params(
msg_size: int | None = None, # (1)!
cheap: bool | None = None, # (2)!
anti_loop_timeout: int | None = None, # (3)!
)
|
-
Set the max size of an alarm message in bytes. Default: 8192.
-
Use main alarm thread rather than create dedicated
threads for curl-based alarms
-
Tune the anti-loop alarm system. Default: 3 seconds.
alarm_types
Alarm types available for .register_alarm().