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,
36 "Monitoring thread failed to start",
41 "Confiration is not set",
62 std::string opmon_facility_uri =
"stdout") :
93 void run( std::stop_token );
98 std::atomic<const confmodel::OpMonConf*>
m_cfg{
nullptr};
auto get_opmon_level() const noexcept
opmon::MonitoringTreeInfo collect() noexcept
auto get_opmon_id() const noexcept
void set_opmon_level(OpMonLevel) noexcept
std::atomic< facility_ptr_t > m_facility
void register_node(ElementId name, NewNodePtr)
MonitorableObject(const MonitorableObject &)=delete
std::atomic< const confmodel::OpMonConf * > m_cfg
friend class TestOpMonManager
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
#define ERS_DECLARE_ISSUE( namespace_name, class_name, message_, attributes)
std::shared_ptr< OpMonFacility > makeOpMonFacility(std::string const &facility, OptionalOrigin=OptionalOrigin())
opmon::OpMonId make_origin(const std::string &session, const std::string &app)
Monitoring thread not ERS_EMPTY MissingConfiguration
ERS_DECLARE_ISSUE(cmdlib, MalformedUri, "Malformed uri: "<< error<< " uri:"<< uri,((std::string) error)((std::string) uri)) ERS_DECLARE_ISSUE(cmdlib
cmdlib specific issues