7#ifndef PERFMON_CONFIG_H
8#define PERFMON_CONFIG_H
81 const std::string& param_name,
82 bool required =
true);
Parses configuration parameters for a single Alarm.
static const data::SimpleKeywords CONFIG_KEYWORDS
List of valid parameters and expected types.
~AlarmParser()=default
Destructor.
AlarmParser()
Constructor.
static AlarmPtr parse(data::ConstElementPtr config, uint16_t family)
Parses configuration parameters for a single DurationKey.
static uint16_t getMessageType(data::ConstElementPtr config, uint16_t family, const std::string ¶m_name, bool required=true)
Convert a configuration parameter to family-specific message type.
~DurationKeyParser()=default
Destructor.
DurationKeyParser()=default
Constructor.
static const data::SimpleKeywords CONFIG_KEYWORDS
List of valid parameters and expected types.
static data::ElementPtr toElement(DurationKeyPtr key)
Convert a DurationKey into a map of Elements.
static uint16_t getMessageNameType6(const std::string &name)
Convert string message name to DHCP6 message type.
static DurationKeyPtr parse(data::ConstElementPtr config, uint16_t family)
Convert a map of Elements into a DurationKey.
static uint16_t getMessageNameType4(const std::string &name)
Convert string message name to DHCP message type.
Houses the PerfMon configuration parameters for a single scope (e.g.
PerfMonConfig(uint16_t family)
Constructor.
uint32_t interval_width_secs_
Number of seconds a duration accumulates samples until reporting.
virtual ~PerfMonConfig()=default
Destructor.
void setIntervalWidthSecs(uint32_t value)
Sets the value of interval-width-secs.
uint32_t alarm_report_secs_
Number of seconds between reports of a raised alarm.
bool getEnableMonitoring() const
Fetches the value of enable-monitoring.
void setEnableMonitoring(bool value)
Sets the value of enable-monitoring.
void parseAlarms(data::ConstElementPtr config)
Re-creates the AlarmStore and populates it by parsing a list of alarm elements.
void setStatsMgrReporting(bool value)
Sets the value of stats-mgr-reporting.
AlarmStorePtr getAlarmStore()
Get the alarm store.
uint16_t family_
Protocol family AF_INET or AF_INET6.
bool getStatsMgrReporting() const
Fetches the value of stats-mgr-reporting.
uint16_t getFamily()
Get protocol family.
void parse(data::ConstElementPtr config)
Extracts member values from an Element::map.
static const data::SimpleDefaults SIMPLE_DEFAULTS
List of valid parameter defaults.
AlarmStorePtr alarm_store_
Stores the configured alarms.
std::atomic< bool > stats_mgr_reporting_
If true durations report to StatsMgr at the end of each interval.
uint32_t getAlarmReportSecs() const
Fetches the value of alarm-report-secs.
uint32_t getIntervalWidthSecs() const
Fetches the value of interval-width-secs.
void setAlarmReportSecs(uint32_t value)
Sets the value of alarm-report-secs.
static const data::SimpleKeywords CONFIG_KEYWORDS
List of valid parameters and expected types.
std::atomic< bool > enable_monitoring_
If true, performance data is processed/reported.
boost::shared_ptr< const Element > ConstElementPtr
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
boost::shared_ptr< Element > ElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< DurationKey > DurationKeyPtr
Defines a pointer to a DurationKey instance.
boost::shared_ptr< AlarmStore > AlarmStorePtr
boost::shared_ptr< PerfMonConfig > PerfMonConfigPtr
Defines a shared pointer to a PerfMonConfig.
boost::shared_ptr< Alarm > AlarmPtr
Defines a pointer to an Alarm instance.
Defines the logger used by the top-level component of kea-lfc.