Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
plugin_metric_collector.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
25#pragma once
26
27#include <string>
28#include <unordered_map>
29#include <vector>
30
32
33namespace kcenon { namespace monitoring {
34
40 public:
41 virtual ~metric_collector_plugin() = default;
42
48 virtual bool initialize(const std::unordered_map<std::string, std::string>& config) = 0;
49
54 virtual std::vector<metric> collect() = 0;
55
60 virtual std::string get_name() const = 0;
61
66 virtual std::vector<std::string> get_metric_types() const = 0;
67
72 virtual bool is_healthy() const = 0;
73
78 virtual std::unordered_map<std::string, double> get_statistics() const = 0;
79};
80
81} } // namespace kcenon::monitoring
virtual bool initialize(const std::unordered_map< std::string, std::string > &config)=0
virtual std::unordered_map< std::string, double > get_statistics() const =0
virtual std::vector< std::string > get_metric_types() const =0
virtual std::string get_name() const =0
virtual std::vector< metric > collect()=0
Adapter for metric types to support interface definitions.