NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::MonitoringService Class Reference

: This class is responsible for handling requests related to fetching information regarding monitoring data. More...

#include <MonitoringService.hpp>

Public Member Functions

 MonitoringService (TopologyPtr topology, RequestHandlerServicePtr requestHandlerService, Catalogs::Query::QueryCatalogPtr queryCatalog)
 
 MonitoringService (TopologyPtr topology, RequestHandlerServicePtr requestHandlerService, Catalogs::Query::QueryCatalogPtr queryCatalog, bool enableMonitoring)
 
nlohmann::json registerMonitoringPlanToAllNodes (Monitoring::MonitoringPlanPtr monitoringPlan)
 Registers a monitoring plan at all nodes. A MonitoringPlan indicates which metrics have to be sampled at a node. More...
 
nlohmann::json requestMonitoringDataAsJson (WorkerId nodeId)
 Requests from a remote worker node its monitoring data. More...
 
nlohmann::json requestMonitoringDataFromAllNodesAsJson ()
 Requests from all remote worker nodes for monitoring data. More...
 
nlohmann::json requestNewestMonitoringDataFromMetricStoreAsJson ()
 Requests from all remote worker nodes for monitoring data. More...
 
nlohmann::json startMonitoringStreams ()
 Starts the monitoring streams for monitoring data. More...
 
nlohmann::json stopMonitoringStreams ()
 Starts the monitoring streams for monitoring data. More...
 
nlohmann::json getMonitoringStreams ()
 Gets the monitoring streams for monitoring data. More...
 
const Monitoring::MonitoringManagerPtr getMonitoringManager () const
 Getter for MonitoringManager. More...
 
bool isMonitoringEnabled () const
 Returns bool if monitoring is enabled or not. More...
 

Detailed Description

: This class is responsible for handling requests related to fetching information regarding monitoring data.

Constructor & Destructor Documentation

◆ MonitoringService() [1/2]

NES::MonitoringService::MonitoringService ( TopologyPtr  topology,
RequestHandlerServicePtr  requestHandlerService,
Catalogs::Query::QueryCatalogPtr  queryCatalog 
)

◆ MonitoringService() [2/2]

NES::MonitoringService::MonitoringService ( TopologyPtr  topology,
RequestHandlerServicePtr  requestHandlerService,
Catalogs::Query::QueryCatalogPtr  queryCatalog,
bool  enableMonitoring 
)

References NES_DEBUG.

Member Function Documentation

◆ getMonitoringManager()

const Monitoring::MonitoringManagerPtr NES::MonitoringService::getMonitoringManager ( ) const

Getter for MonitoringManager.

Returns
The MonitoringManager

◆ getMonitoringStreams()

nlohmann::json NES::MonitoringService::getMonitoringStreams ( )

Gets the monitoring streams for monitoring data.

Returns
a json with all query IDs and the status indicated by the registered MonitoringPlan.

◆ isMonitoringEnabled()

bool NES::MonitoringService::isMonitoringEnabled ( ) const

Returns bool if monitoring is enabled or not.

Returns
Monitoring flag

◆ registerMonitoringPlanToAllNodes()

nlohmann::json NES::MonitoringService::registerMonitoringPlanToAllNodes ( Monitoring::MonitoringPlanPtr  monitoringPlan)

Registers a monitoring plan at all nodes. A MonitoringPlan indicates which metrics have to be sampled at a node.

Parameters
monitoringPlan
Returns
json to indicate if it was successfully

References backward::details::move().

Here is the call graph for this function:

◆ requestMonitoringDataAsJson()

nlohmann::json NES::MonitoringService::requestMonitoringDataAsJson ( WorkerId  nodeId)

Requests from a remote worker node its monitoring data.

Returns
a json with all metrics indicated by the registered MonitoringPlan.

References NES_DEBUG, and nodeId.

Referenced by requestMonitoringDataFromAllNodesAsJson().

Here is the caller graph for this function:

◆ requestMonitoringDataFromAllNodesAsJson()

nlohmann::json NES::MonitoringService::requestMonitoringDataFromAllNodesAsJson ( )

Requests from all remote worker nodes for monitoring data.

Returns
a json with all metrics indicated by the registered MonitoringPlan.

References NES_INFO, nodeId, NES::Monitoring::RegistrationMetric, requestMonitoringDataAsJson(), NES::Monitoring::MetricUtils::toJson(), and NES::Monitoring::toString().

Here is the call graph for this function:

◆ requestNewestMonitoringDataFromMetricStoreAsJson()

nlohmann::json NES::MonitoringService::requestNewestMonitoringDataFromMetricStoreAsJson ( )

Requests from all remote worker nodes for monitoring data.

Returns
a json with all metrics indicated by the registered MonitoringPlan.

References NES_INFO, nodeId, and NES::Monitoring::MetricUtils::toJson().

Here is the call graph for this function:

◆ startMonitoringStreams()

nlohmann::json NES::MonitoringService::startMonitoringStreams ( )

Starts the monitoring streams for monitoring data.

Returns
true if initiated

◆ stopMonitoringStreams()

nlohmann::json NES::MonitoringService::stopMonitoringStreams ( )

Starts the monitoring streams for monitoring data.

Returns
true if initiated

The documentation for this class was generated from the following files: