DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Public Member Functions | |
None | __init__ (self, OpMonConf conf, int|str log_level=logging.INFO, bool rich_handler=False) |
None | publish_message (self, logging.Logger logger, int|str level, str message) |
None | publish (self, Msg message, dict[str, str]|None custom_origin=None, int|str|None level=None) |
![]() | |
None | __post_init__ (self) |
None | check_publisher (self) |
str | extract_topic (self, Msg message) |
OpMonId | make_origin (self, str session, str app) |
dict[str, str] | validate_custom_origin (self, dict[str, str]|None custom_origin=None) |
dict | make_data (self, Msg message, str top_block="") |
OpMonValue | to_map (self, int|float|bool|str value, int field_type) |
OpMonEntry | to_entry (self, Msg message, dict[str, str]|None custom_origin) |
int | log_level_to_int (self, str|int level) |
str | log_level_to_str (self, str|int level) |
Public Attributes | |
log = logging.getLogger("OpMonPublisher") | |
conf = conf | |
str | default_topic = "monitoring." + self.conf.topic |
publisher = logging.getLogger(self.default_topic) | |
![]() | |
ts = Timestamp() | |
substructure = None | |
log | |
conf | |
publisher = "OpMon configuration must be of type OpMonConf." | |
default_topic | |
tuple | publisher |
Publish operational monitoring metrics to file or stream.
Definition at line 17 of file publisher.py.
None opmonlib.publisher.OpMonPublisher.__init__ | ( | self, | |
OpMonConf | conf, | ||
int | str | log_level = logging.INFO, | ||
bool | rich_handler = False ) |
Construct the object to publish OpMon metrics to stdout.
Reimplemented from opmonlib.publisher_base.OpMonPublisherBase.
Definition at line 20 of file publisher.py.
None opmonlib.publisher.OpMonPublisher.publish | ( | self, | |
Msg | message, | ||
dict[str, str] | None | custom_origin = None, | ||
int | str | None | level = None ) |
Publish the message to either a file or the terminal.
Reimplemented from opmonlib.publisher_base.OpMonPublisherBase.
Definition at line 69 of file publisher.py.
None opmonlib.publisher.OpMonPublisher.publish_message | ( | self, | |
logging.Logger | logger, | ||
int | str | level, | ||
str | message ) |
Log the metric with the appropriate level.
Definition at line 61 of file publisher.py.
opmonlib.publisher.OpMonPublisher.conf = conf |
Definition at line 34 of file publisher.py.
str opmonlib.publisher.OpMonPublisher.default_topic = "monitoring." + self.conf.topic |
Definition at line 53 of file publisher.py.
opmonlib.publisher.OpMonPublisher.log = logging.getLogger("OpMonPublisher") |
Definition at line 28 of file publisher.py.
opmonlib.publisher.OpMonPublisher.publisher = logging.getLogger(self.default_topic) |
Definition at line 54 of file publisher.py.