9#ifndef OPMONLIB_INCLUDE_OPMONLIB_OPMONMANAGER_HPP_
10#define OPMONLIB_INCLUDE_OPMONLIB_OPMONMANAGER_HPP_
25 "The name " << name <<
" is too long for a thread name",
31 "Monitoring thread not set",
35 FailedMonitoringThread,
41 "Confiration is not
set",
62 std::string opmon_facility_uri =
"stdout") :
67 using MonitorableObject::get_opmon_id;
68 using MonitorableObject::get_opmon_level;
69 using MonitorableObject::register_node;
70 using MonitorableObject::set_opmon_level;
73 void start_monitoring();
80 set_opmon_level( m_cfg.load()->get_level() );
84 using MonitorableObject::collect;
93 void run( std::stop_token );
98 std::atomic<const confmodel::OpMonConf*> m_cfg{
nullptr};
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
virtual ~OpMonManager()=default
OpMonManager(std::string session, std::string name, std::string opmon_facility_uri="stdout")
auto get_opmon_facility() const
void set_opmon_conf(const confmodel::OpMonConf *c)
static volatile sig_atomic_t run
std::shared_ptr< OpMonFacility > makeOpMonFacility(std::string const &facility, OptionalOrigin=OptionalOrigin())
opmon::OpMonId make_origin(const std::string &session, const std::string &app)
Unsupported std::string uri Execution of command failed
Monitoring thread not ERS_EMPTY MissingConfiguration
Monitoring thread not set