NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
Pre-defined metrics used for NES internally. More...
#include <MetricUtils.hpp>
Static Public Member Functions | |
static bool | validateFieldsInSchema (SchemaPtr metricSchema, SchemaPtr bufferSchema, uint64_t schemaIndex) |
static nlohmann::json | toJson (std::vector< MetricPtr > metrics) |
static nlohmann::json | toJson (std::unordered_map< MetricType, std::shared_ptr< Metric >> metrics) |
static nlohmann::json | toJson (StoredNodeMetricsPtr metrics) |
static MetricCollectorPtr | createCollectorFromCollectorType (MetricCollectorType type) |
static Configurations::SchemaTypePtr | getSchemaFromCollectorType (MetricCollectorType type) |
static MetricPtr | createMetricFromCollectorType (MetricCollectorType type) |
Creates a metric from the according collector. More... | |
static MetricCollectorType | createCollectorTypeFromMetricType (MetricType type) |
Creates a metric from the according collector. More... | |
Pre-defined metrics used for NES internally.
|
static |
Creates a metric collector from the corresponding type.
type |
References NES::Monitoring::CPU_COLLECTOR, NES::Monitoring::DISK_COLLECTOR, magic_enum::enum_name(), NES::Monitoring::MEMORY_COLLECTOR, NES_FATAL_ERROR, NES::Monitoring::NETWORK_COLLECTOR, and type.
|
static |
Creates a metric from the according collector.
type |
References NES::Monitoring::CPU_COLLECTOR, NES::Monitoring::CpuMetric, NES::Monitoring::DISK_COLLECTOR, NES::Monitoring::DiskMetric, magic_enum::enum_name(), NES::Monitoring::INVALID, NES::Monitoring::MEMORY_COLLECTOR, NES::Monitoring::MemoryMetric, NES_ERROR, NES::Monitoring::NETWORK_COLLECTOR, NES::Monitoring::NetworkMetric, type, NES::Monitoring::WrappedCpuMetrics, and NES::Monitoring::WrappedNetworkMetrics.
Referenced by NES::Monitoring::MonitoringAgent::addMonitoringStreams(), and NES::Monitoring::MonitoringManager::startOrRedeployMonitoringQuery().
|
static |
Creates a metric from the according collector.
type |
References NES::Monitoring::CPU_COLLECTOR, NES::Monitoring::DISK_COLLECTOR, NES::Monitoring::DiskMetric, magic_enum::enum_name(), NES::Monitoring::MEMORY_COLLECTOR, NES::Monitoring::MemoryMetric, NES_FATAL_ERROR, NES::Monitoring::NETWORK_COLLECTOR, type, NES::Monitoring::WrappedCpuMetrics, and NES::Monitoring::WrappedNetworkMetrics.
Referenced by NES::Monitoring::MonitoringManager::registerLogicalMonitoringStreams(), NES::MonitoringQueriesTest::runMetricsQueryTest(), and NES::MonitoringSink::writeData().
|
static |
Retrieves the schema from the according type.
type |
References NES::Monitoring::CPU_COLLECTOR, NES::Monitoring::DISK_COLLECTOR, magic_enum::enum_name(), NES::Monitoring::CpuMetrics::getSchemaType(), NES::Monitoring::DiskMetrics::getSchemaType(), NES::Monitoring::NetworkMetrics::getSchemaType(), NES::Monitoring::MemoryMetrics::getSchemaType(), NES::Monitoring::MEMORY_COLLECTOR, NES_FATAL_ERROR, NES::Monitoring::NETWORK_COLLECTOR, and type.
Referenced by NES::Monitoring::MonitoringManager::registerLogicalMonitoringStreams().
|
static |
Converts a map of metric types to metrics into json.
metrics |
References NES::Monitoring::asJson(), and magic_enum::enum_name().
|
static |
Converts a vector of metrics into json.
metrics |
References NES::Monitoring::asJson(), and magic_enum::enum_name().
Referenced by NES::MetricValidator::isValid(), NES::MonitoringService::requestMonitoringDataFromAllNodesAsJson(), and NES::MonitoringService::requestNewestMonitoringDataFromMetricStoreAsJson().
|
static |
Converts a map of metric types to metrics into json.
metrics |
References NES::Monitoring::asJson(), magic_enum::enum_name(), and timestamp.
|
static |
metricSchema | |
bufferSchema | |
prefix |
References NES::Util::endsWith().