|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
The MonitoringManager is responsible for managing all global metrics of all nodes in the topology. More...
#include <MonitoringManager.hpp>
Public Member Functions | |
| MonitoringManager (TopologyPtr topology, RequestHandlerServicePtr requestHandlerService, Catalogs::Query::QueryCatalogPtr queryCatalog, MetricStorePtr metricStore, bool enableMonitoring) | |
| MonitoringManager (TopologyPtr topology, RequestHandlerServicePtr requestHandlerService, Catalogs::Query::QueryCatalogPtr queryCatalog, bool enableMonitoring) | |
| Ctor to create a MonitoringManger for a given topology. For communication the manager will use the corresponding RPC client. More... | |
| MonitoringManager (TopologyPtr topology, RequestHandlerServicePtr requestHandlerService, Catalogs::Query::QueryCatalogPtr queryCatalog) | |
| MonitoringManager (const MonitoringManager &)=default | |
| MonitoringManager (MonitoringManager &&)=default | |
| MonitoringManager & | operator= (const MonitoringManager &)=default |
| MonitoringManager & | operator= (MonitoringManager &&)=default |
| ~MonitoringManager () | |
| bool | registerRemoteMonitoringPlans (const std::vector< WorkerId > &nodeIds, MonitoringPlanPtr monitoringPlan) |
| Register a monitoring plan for given nodes. More... | |
| nlohmann::json | requestRemoteMonitoringData (WorkerId nodeId) |
| Get the monitoring data for a given node. Note: Multiple nodes are not possible, as every node can have a different monitoring plan and TupleBuffer is not supporting different nested schemas. More... | |
| StoredNodeMetricsPtr | getMonitoringDataFromMetricStore (WorkerId nodeId) |
| Requests monitoring data from metric store. More... | |
| void | addMonitoringData (WorkerId nodeId, MetricPtr metrics) |
| Receive arbitrary monitoring data from a given node. More... | |
| void | removeMonitoringNode (WorkerId nodeId) |
| Remove node from monitoring store. More... | |
| MonitoringPlanPtr | getMonitoringPlan (WorkerId nodeId) |
| Get the monitoring plan for a given node ID. If the node exists in the topology but has not a registered plan, MonitoringPlan::Default will be returned. If the node does not exist an NES exception is thrown. More... | |
| bool | registerLogicalMonitoringStreams (const NES::Configurations::CoordinatorConfigurationPtr config) |
| Registers the logical monitoring streams at the coordinator. More... | |
| std::unordered_map< std::string, QueryId > | startOrRedeployMonitoringQueries (bool sync) |
| Starts or redeploys monitoring queries at the coordinator. More... | |
| QueryId | startOrRedeployMonitoringQuery (std::string monitoringStream, bool sync) |
| Starts or redeploys monitoring queries at the coordinator. More... | |
| bool | isMonitoringStream (std::string streamName) const |
| Checks if the logical stream is a monitoring stream. More... | |
| bool | stopRunningMonitoringQuery (std::string streamName, bool sync) |
| Stops a given running monitoring query;. More... | |
| bool | stopRunningMonitoringQueries (bool sync) |
| Stops all running monitoring queries;. More... | |
| MetricStorePtr | getMetricStore () |
| const std::unordered_map< std::string, QueryId > & | getDeployedMonitoringQueries () const |
| Get the deployed monitoring queries. More... | |
The MonitoringManager is responsible for managing all global metrics of all nodes in the topology.
| NES::Monitoring::MonitoringManager::MonitoringManager | ( | TopologyPtr | topology, |
| RequestHandlerServicePtr | requestHandlerService, | ||
| Catalogs::Query::QueryCatalogPtr | queryCatalog, | ||
| MetricStorePtr | metricStore, | ||
| bool | enableMonitoring | ||
| ) |
Ctor to create a MonitoringManger for a given topology. For communication the manager will use the corresponding RPC client.
| topology | the topology |
| requestHandlerService | request handler |
| queryCatalog | the query catalog |
| metricStore | the metric store |
| enableMonitoring | flag to indicate if monitoring is enabled or not |
References magic_enum::enum_name(), and NES_DEBUG.
| NES::Monitoring::MonitoringManager::MonitoringManager | ( | TopologyPtr | topology, |
| RequestHandlerServicePtr | requestHandlerService, | ||
| Catalogs::Query::QueryCatalogPtr | queryCatalog, | ||
| bool | enableMonitoring | ||
| ) |
Ctor to create a MonitoringManger for a given topology. For communication the manager will use the corresponding RPC client.
| topology | the topology |
| requestHandlerService | request handler |
| queryCatalog | the query catalog |
| enableMonitoring | flag to indicate if monitoring is enabled or not |
| NES::Monitoring::MonitoringManager::MonitoringManager | ( | TopologyPtr | topology, |
| RequestHandlerServicePtr | requestHandlerService, | ||
| Catalogs::Query::QueryCatalogPtr | queryCatalog | ||
| ) |
Ctor to create a MonitoringManger for a given topology. For communication the manager will use the corresponding RPC client.
| topology | the topology |
| requestHandlerService | the query service |
| queryCatalog | the query catalog |
|
default |
|
default |
| NES::Monitoring::MonitoringManager::~MonitoringManager | ( | ) |
References NES_DEBUG.
Receive arbitrary monitoring data from a given node.
| nodeId | |
| GroupedMetricValuesPtr | the grouped metric values |
References magic_enum::enum_name(), NES_TRACE, and nodeId.
| const std::unordered_map< std::string, QueryId > & NES::Monitoring::MonitoringManager::getDeployedMonitoringQueries | ( | ) | const |
Get the deployed monitoring queries.
| MetricStorePtr NES::Monitoring::MonitoringManager::getMetricStore | ( | ) |
Getter for the metric store
| StoredNodeMetricsPtr NES::Monitoring::MonitoringManager::getMonitoringDataFromMetricStore | ( | WorkerId | nodeId | ) |
Requests monitoring data from metric store.
| nodeId |
| MonitoringPlanPtr NES::Monitoring::MonitoringManager::getMonitoringPlan | ( | WorkerId | nodeId | ) |
Get the monitoring plan for a given node ID. If the node exists in the topology but has not a registered plan, MonitoringPlan::Default will be returned. If the node does not exist an NES exception is thrown.
| nodeId |
References NES::Monitoring::MonitoringPlan::defaultPlan(), NES_DEBUG, NES_THROW_RUNTIME_ERROR, and nodeId.
Referenced by requestRemoteMonitoringData().
| bool NES::Monitoring::MonitoringManager::isMonitoringStream | ( | std::string | streamName | ) | const |
Checks if the logical stream is a monitoring stream.
| streamName |
|
default |
|
default |
| bool NES::Monitoring::MonitoringManager::registerLogicalMonitoringStreams | ( | const NES::Configurations::CoordinatorConfigurationPtr | config | ) |
Registers the logical monitoring streams at the coordinator.
References NES::Monitoring::MetricUtils::createMetricFromCollectorType(), magic_enum::enum_name(), NES::Monitoring::MetricUtils::getSchemaFromCollectorType(), NES::TestUtils::logicalSourceName(), NES_INFO, and NES_WARNING.
| bool NES::Monitoring::MonitoringManager::registerRemoteMonitoringPlans | ( | const std::vector< WorkerId > & | nodeIds, |
| MonitoringPlanPtr | monitoringPlan | ||
| ) |
| void NES::Monitoring::MonitoringManager::removeMonitoringNode | ( | WorkerId | nodeId | ) |
| nlohmann::json NES::Monitoring::MonitoringManager::requestRemoteMonitoringData | ( | WorkerId | nodeId | ) |
Get the monitoring data for a given node. Note: Multiple nodes are not possible, as every node can have a different monitoring plan and TupleBuffer is not supporting different nested schemas.
| nodeId | |
| tupleBuffer |
References getMonitoringPlan(), NES_DEBUG, NES_ERROR, NES_THROW_RUNTIME_ERROR, and nodeId.
| std::unordered_map< std::string, QueryId > NES::Monitoring::MonitoringManager::startOrRedeployMonitoringQueries | ( | bool | sync | ) |
Starts or redeploys monitoring queries at the coordinator.
References NES_ERROR, startOrRedeployMonitoringQuery(), and stopRunningMonitoringQuery().
| QueryId NES::Monitoring::MonitoringManager::startOrRedeployMonitoringQuery | ( | std::string | monitoringStream, |
| bool | sync | ||
| ) |
Starts or redeploys monitoring queries at the coordinator.
| the | logical stream name of the monitoring stream |
| bool | true if it should block, else false |
References NES::Optimizer::BottomUp, NES::Monitoring::MetricUtils::createCollectorTypeFromMetricType(), magic_enum::enum_name(), NES_ERROR, NES_INFO, and stopRunningMonitoringQuery().
Referenced by startOrRedeployMonitoringQueries().
| bool NES::Monitoring::MonitoringManager::stopRunningMonitoringQueries | ( | bool | sync | ) |
Stops all running monitoring queries;.
| sync | if to true then block |
References NES_ERROR, and stopRunningMonitoringQuery().
| bool NES::Monitoring::MonitoringManager::stopRunningMonitoringQuery | ( | std::string | streamName, |
| bool | sync | ||
| ) |
Stops a given running monitoring query;.
| the | name of the monitoring stream |
| sync | if it should block or not |
References NES_ERROR, and NES_INFO.
Referenced by startOrRedeployMonitoringQueries(), startOrRedeployMonitoringQuery(), and stopRunningMonitoringQueries().